On 2015-01-11 23:00, Nicolas Goaziou writes: > Alan Schmitt writes: > >> Here is an updated patch. I can push it or not, depending on the issue >> below. > > Thanks. The patch is OK. Great. I won't commit it, though, as I prefer to solve the space thing. >> I have looked at the code and it works *very* differently. I think I can >> make the `org-export-resolve-fuzzy-link' take spaces into accounts for >> headlines, but I don't see how it is "fuzzy". > > I'd rather ignore whitespace when matching headlines. It can be useful > when skipping statistics cookies. E.g., > > * Completed: [33%] so far > > can be matched with either [[Completed: so far]] and [[Completed: so far]]. I don't understand: won't you need the "[33%]" bit for an exact search? Also, does ignoring whitespace mean replacing any (non-empty) amount of whitespace by non-empty whitespace, or can you also insert or delete whitespace between contiguous strings: - do "foobar" and "foo bar" match? - do "foo bar" and "foobar" match? > [[fuzzy]]-like links are fuzzy because they can match either a headline, > a #+NAME or a <>. I see. > I lean towards making the change the other way. OK, I think I can do it if we do not allow to insert whitespace in arbitrary positions (searching "foobar" will not match "foo bar"). >>> Also, would you mind adding a test in test-org/fuzzy-links >>> ("test-org.el") and an entry in ORG-NEWS? >> >> I guess this should be done if I change `org-export-resolve-fuzzy-link', >> or should I do it anyway? > > I think a test would be nice for the change you are making to > `org-link-search', i.e, you can extend "test-org/fuzzy-links" (part with > [[*Test]]) to ensure that match is exact, independently on > `org-link-search-must-match-exact-headline'. OK, I'll look into it. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7