Hello, "Nicolas Bercher (Aʟᴏɴɢ-Tʀᴀᴄᴋ)" <nberc...@along-track.com> writes:
> HOWEVER, in the case of links pointing to headlines, the matching to has > to be EXACT (but it was not necessary in earlier version since 2011 at > least) otherwise I get the message below: > > "No match for fuzzy expression: <random text>" > > Do you know if I can revert some option to make the sample below to work > again? You cannot. This option somehow disappeared years ago. Note that you can complete "[[*" with M-<TAB>, which can help a bit. If the feature is considered useful anyway, `org-link-search-must-match-exact-headline' is not the right way to solve this. With this variable, that the same document can mean two different things, which cripples portability. For example, the following document * XX Contents 1 * X Contents 2 * Headline See [[*X]]. means two different things if you set `org-link-search-must-match-exact-headline' to nil and I don't. Granted, you can use file local variables to fix a given value in the document, but that doesn't sound right. Org format ought to be more self-contained. So, here's an idea. We could drop `org-link-search-must-match-exact-headline' (the `query-to-create' value could be handled in a dedicated variable) and introduce a new syntax for regexp searches: [[?random words]] and [[*?random words]] This way, where the link should point to is explicit. The question about export is still open. [[*?random words]] targets a headline it can be handled the usual way. However [[?random words]] may target anything, including parts of the document that cannot be referenced easily (e.g., comments, the contents of an example block...). Another option is to keep only [[*?random words]] since we cannot handle the other properly. Note that, even without this feature, you can still use targets for specific locations in the buffer: Some <<here>>long text [[here]] I have the feeling that a feature like [[?random words]] (and `org-link-search-must-match-exact-headline') is going to bite us someday. WDYT? Regards, -- Nicolas Goaziou