From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: doc patch: move footnote in external links Date: Sat, 13 Dec 2014 10:43:22 +0100 Message-ID: References: <87egs4bwuu.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzl1I-00071u-RC for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 06:38:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xzl1D-0006b6-ST for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 06:37:56 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:58690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xzl1D-0006aP-Ls for emacs-orgmode@gnu.org; Sat, 13 Dec 2014 06:37:51 -0500 Received: from charm-wifi.irisa.fr (cbg35-2-78-242-14-140.fbx.proxad.net [78.242.14.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 31485140C76C7 for ; Sat, 13 Dec 2014 12:37:49 +0100 (CET) In-Reply-To: <87egs4bwuu.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 12 Dec 2014 18:29:13 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, On 2014-12-12 18:29, Nicolas Goaziou writes: > Hello, > > Alan Schmitt writes: > >> I think the footnote in >> http://orgmode.org/manual/External-links.html#fn-1 is in the wrong >> place, it should be on the next line. >> >> Here is a patch to fix it. If you prefer I can push it directly >> myself. > > I think the current documentation is correct. Only > > file:projects.org::some words > > can trigger a text search. OTOH > > file:projects.org::*Headline > > is always an exact match against headlines in the file. I've re-read the code, and I think this is partially correct. The only place the `org-link-search-must-match-exact-headline' is used is below, in a big conditional in `org-link-search'. The clauses before are used to check special cases. #+begin_src emacs-lisp ((and (derived-mode-p 'org-mode) org-link-search-must-match-exact-head= line) (and (equal (string-to-char s) ?*) (setq s (substring s 1))) (goto-char (point-min)) (cond ((let (case-fold-search) (re-search-forward (format org-complex-heading-regexp-format (regexp-quote s)) nil t)) ;; OK, found a match (setq type 'dedicated) (goto-char (match-beginning 0))) ((and (not org-link-search-inhibit-query) (eq org-link-search-must-match-exact-headline 'query-to-create) (y-or-n-p "No match - create this as a new heading? ")) (goto-char (point-max)) (or (bolp) (newline)) (insert "* " s "\n") (beginning-of-line 0)) (t (goto-char pos) (error "No match")))) #+end_src So you are correct the footnote applies to the text search. However, I think is also applies to the headline search (as suggested by the second line of the snippet). In other words, if I search for file:projects.org::*Headline with `org-link-search-must-match-exact-headline' set to 'query-to-create, then I will be asked to create a headline.=20 Should I add a footnote to that effect? Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJUjAo/AAoJEAQNCjtO0uXHddoH/1jCBHi0L2dRC8jJUtyPNulx OOksscILoX6MNGVdhrDs05xaIUsaOo20IT1xJlRlOrVWvE23bql86GnA9Da9oRHv e2SNYLIsqHoWfemVP58fInU2E1EYEh5ogqf7PIdZ7VF5D/l1NSaeLvlOiOzIDJ9Z 6rKY8tl4ZepuK/k69PqIwUikDN4rMMxnkVpgsTOOmyrwtjWmQiAk7Uu8cgfssMxR 6JkM6pnfYdbk2P9ktY8PEWc6sjhws8kX0cF0DXL92WlSscipQcchEd0QrrxrIVv4 ZzRXNfEp0k9UjXMOMU+AgH+WCf+iTsOMKXmitqTASd5Wt2joqHwgS6mkp2p241o= =kr4L -----END PGP SIGNATURE----- --=-=-=--