From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [IT] Broken support for links to text files (both internal & external) Date: Tue, 09 Jan 2018 20:36:14 +0100 Message-ID: <87lgh63jv5.fsf@nicolasgoaziou.fr> References: <4abbb185-4323-8c62-c4f7-4a9a3b7a6b88@along-track.com> <87o9m8g3r8.fsf@nicolasgoaziou.fr> <87k1wwij8r.fsf@gmail.com> <1fa8ac46-6dd4-483c-6646-7a4635aa31b6@along-track.com> <1cad6675-4cd6-d8fd-6b1c-0c94a9aa2890@along-track.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYzh4-00040N-VT for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 14:36:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYzh4-0008As-2z for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 14:36:19 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:46170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYzh3-00085n-Sy for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 14:36:18 -0500 In-Reply-To: <1cad6675-4cd6-d8fd-6b1c-0c94a9aa2890@along-track.com> (Nicolas Bercher's message of "Mon, 8 Jan 2018 18:56:47 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?utf-8?B?Tmljb2xhcyBCZXJjaGVyIChByp/htI/JtMmiLVTKgOG0gOG0hOG0iyk=?= Cc: emacs-orgmode@gnu.org Hello, "Nicolas Bercher (A=CA=9F=E1=B4=8F=C9=B4=C9=A2-T=CA=80=E1=B4=80=E1=B4=84=E1= =B4=8B)" 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: " > > 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-, 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.=20 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 <>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, --=20 Nicolas Goaziou