From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 14:35:21 2013 Received: (at submit) by debbugs.gnu.org; 25 Jun 2013 18:35:21 +0000 Received: from localhost ([127.0.0.1]:40906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrY5I-0005Q2-EH for submit@debbugs.gnu.org; Tue, 25 Jun 2013 14:35:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34969) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrY5F-0005PT-Hd for submit@debbugs.gnu.org; Tue, 25 Jun 2013 14:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrY55-0000k6-8m for submit@debbugs.gnu.org; Tue, 25 Jun 2013 14:35:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrY55-0000jr-4r for submit@debbugs.gnu.org; Tue, 25 Jun 2013 14:35:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrY4y-000531-Oe for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 14:35:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrY4v-0000PW-Pt for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 14:35:00 -0400 Received: from mout.gmx.net ([212.227.15.19]:63462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrY4v-0000OV-Gk for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 14:34:57 -0400 Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0M0vtR-1TzjQu2cwx-00v4E9 for ; Tue, 25 Jun 2013 20:34:55 +0200 Received: (qmail invoked by alias); 25 Jun 2013 18:34:54 -0000 Received: from i59F575FA.versanet.de (EHLO rosalinde.fritz.box) [89.245.117.250] by mail.gmx.net (mp019) with SMTP; 25 Jun 2013 20:34:54 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/m20F2hcvme5tPjQZuq4P8YnKOigR4bbRfvVcTeI JuT8kDA9hJ7PD3 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Info-try-follow-nearest-node misses some footnotes Date: Tue, 25 Jun 2013 20:34:53 +0200 Message-ID: <87vc52599u.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) 0. emacs -Q 1. Type `C-h i m Elisp RET m Using Interactive RET TAB TAB TAB' to put point on the left parent of the reference mark for footnote (1) in this node. 2. Type RET, expecting to jump to the footnote, but instead: => user-error: No such node or anchor: It may be a string; its contents are a sequence of elements The reason is that in Info-try-follow-nearest-node the search for a node name succeeds, so it never gets to the footnote search, but the matching string is not a node name, so user-error is signalled. The following patch makes the footnote search and hence jumping to the footnote in that node succeed, but I'll defer to the judgment of the Info or regexp gurus as to whether it's the best fix. === modified file 'lisp/info.el' *** lisp/info.el 2013-05-27 22:42:11 +0000 --- lisp/info.el 2013-06-25 18:24:56 +0000 *************** *** 3870,3892 **** ((setq node (Info-get-token (point) "\\*note[ \n\t]+" "\\*note[ \n\t]+\\([^:]*\\):\\(:\\|[ \n\t]*(\\)?")) (Info-follow-reference node fork)) - ;; menu item: node name - ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) - (Info-goto-node node fork)) - ;; menu item: node name or index entry - ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") - (beginning-of-line) - (forward-char 2) - (setq node (Info-extract-menu-node-name nil (Info-index-node))) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) - ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)")) - (Info-goto-node "Top" fork)) - ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)")) - (Info-goto-node node fork)) ;; footnote ((setq node (Info-get-token (point) "(" "\\(([0-9]+)\\)")) (let ((old-point (point)) new-point) --- 3870,3875 ---- *************** *** 3904,3910 **** (progn (goto-char new-point) (setq node t)) ! (setq node nil))))) node)) (defun Info-mouse-follow-link (click) --- 3887,3910 ---- (progn (goto-char new-point) (setq node t)) ! (setq node nil)))) ! ;; menu item: node name ! ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) ! (Info-goto-node node fork)) ! ;; menu item: node name or index entry ! ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") ! (beginning-of-line) ! (forward-char 2) ! (setq node (Info-extract-menu-node-name nil (Info-index-node))) ! (Info-goto-node node fork)) ! ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) ! (Info-goto-node node fork)) ! ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)")) ! (Info-goto-node node fork)) ! ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)")) ! (Info-goto-node "Top" fork)) ! ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)")) ! (Info-goto-node node fork))) node)) (defun Info-mouse-follow-link (click) In GNU Emacs 24.3.50.2 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4) of 2013-06-25 on rosalinde Bzr revision: 113175 lekktu@gmail.com-20130625172019-xiu7eowuwtknvz39 Windowing system distributor `The X.Org Foundation', version 11.0.11203000 System Description: openSUSE 12.2 (x86_64) Configured using: `configure --without-toolkit-scroll-bars CFLAGS=-g3 -O0' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 19:40:41 2013 Received: (at 14717) by debbugs.gnu.org; 26 Jun 2013 23:40:41 +0000 Received: from localhost ([127.0.0.1]:43909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrzKJ-0007hU-4D for submit@debbugs.gnu.org; Wed, 26 Jun 2013 19:40:40 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:40105 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrzKF-0007gt-UK for 14717@debbugs.gnu.org; Wed, 26 Jun 2013 19:40:37 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 78517258B9E915; Wed, 26 Jun 2013 16:40:34 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#14717: 24.3.50; Info-try-follow-nearest-node misses some footnotes Organization: JURTA References: <87vc52599u.fsf@rosalinde.fritz.box> Date: Thu, 27 Jun 2013 02:39:07 +0300 In-Reply-To: <87vc52599u.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 25 Jun 2013 20:34:53 +0200") Message-ID: <8738s4jvc4.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14717 Cc: 14717@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 0. emacs -Q > 1. Type `C-h i m Elisp RET m Using Interactive RET TAB TAB TAB' to put > point on the left parent of the reference mark for footnote (1) in > this node. > 2. Type RET, expecting to jump to the footnote, but instead: > => user-error: No such node or anchor: It may be a string; its contents > are a sequence of elements > > The following patch makes the footnote search and > hence jumping to the footnote in that node succeed Thanks, your patch correctly fixes the bug, I recommend to commit it. BTW, if you are interested what I'm trying to do in bug#14670 where I renamed the text property of footnotes from `link' to `shr-url' is to support shr-url links in Info. The value of the text properly `shr-url' is the target of the link. The problem is how to address a footnote? Maybe add a function that finds a footnote. But I'm afraid that supporting an arbitrary function on the text properly `shr-url' is too unsafe. So `shr-url' should contain only a string. The question is in what format to specify a link to a footnote. Currently it has the value `t'. Perhaps as a string it could contain a line number of the footnote like "(elisp) Using Interactive (line 42)". From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 05:37:29 2013 Received: (at 14717-done) by debbugs.gnu.org; 27 Jun 2013 09:37:29 +0000 Received: from localhost ([127.0.0.1]:44675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Us8ds-0002zx-Po for submit@debbugs.gnu.org; Thu, 27 Jun 2013 05:37:29 -0400 Received: from mout.gmx.net ([212.227.17.20]:61728) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Us8dp-0002zg-Eo for 14717-done@debbugs.gnu.org; Thu, 27 Jun 2013 05:37:26 -0400 Received: from mailout-de.gmx.net ([10.1.76.29]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LwTtx-1UCKAL3Sm7-018Jb8 for <14717-done@debbugs.gnu.org>; Thu, 27 Jun 2013 11:37:18 +0200 Received: (qmail invoked by alias); 27 Jun 2013 09:37:18 -0000 Received: from i59F5577E.versanet.de (EHLO rosalinde.fritz.box) [89.245.87.126] by mail.gmx.net (mp029) with SMTP; 27 Jun 2013 11:37:18 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+WZUZZhfSWIbvmww5RMq58VGEFqzm1s0KjP+1EtC FGlg8dxq057EX9 From: Stephen Berman To: Juri Linkov Subject: Re: bug#14717: 24.3.50; Info-try-follow-nearest-node misses some footnotes References: <87vc52599u.fsf@rosalinde.fritz.box> <8738s4jvc4.fsf@mail.jurta.org> Date: Thu, 27 Jun 2013 11:37:16 +0200 In-Reply-To: <8738s4jvc4.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 27 Jun 2013 02:39:07 +0300") Message-ID: <87d2r7vqr7.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 14717-done Cc: 14717-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) On Thu, 27 Jun 2013 02:39:07 +0300 Juri Linkov wrote: >> 0. emacs -Q >> 1. Type `C-h i m Elisp RET m Using Interactive RET TAB TAB TAB' to put >> point on the left parent of the reference mark for footnote (1) in >> this node. >> 2. Type RET, expecting to jump to the footnote, but instead: >> => user-error: No such node or anchor: It may be a string; its contents >> are a sequence of elements >> >> The following patch makes the footnote search and >> hence jumping to the footnote in that node succeed > > Thanks, your patch correctly fixes the bug, Thanks for confirming. > I recommend to commit it. Done and closing the bug. > BTW, if you are interested what I'm trying to do in bug#14670 > where I renamed the text property of footnotes from `link' to `shr-url' > is to support shr-url links in Info. The value of the text properly > `shr-url' is the target of the link. The problem is how to address > a footnote? Maybe add a function that finds a footnote. But I'm afraid > that supporting an arbitrary function on the text properly `shr-url' > is too unsafe. So `shr-url' should contain only a string. The question > is in what format to specify a link to a footnote. Currently it has > the value `t'. Perhaps as a string it could contain a line number > of the footnote like "(elisp) Using Interactive (line 42)". Would that mean the link would have to be manually updated whenever the line number of the footnote in the file changes? If so, it seems error-prone. But I don't know the implementation, maybe that's not an issue. Otherwise, seems like an interesting idea. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 18:02:48 2013 Received: (at 14717) by debbugs.gnu.org; 28 Jun 2013 22:02:49 +0000 Received: from localhost ([127.0.0.1]:47373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Usgkh-0007SU-Ma for submit@debbugs.gnu.org; Fri, 28 Jun 2013 18:02:48 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:42999 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Usgke-0007SG-MN for 14717@debbugs.gnu.org; Fri, 28 Jun 2013 18:02:45 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 4B356258B9E915; Fri, 28 Jun 2013 15:02:43 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#14717: 24.3.50; Info-try-follow-nearest-node misses some footnotes Organization: JURTA References: <87vc52599u.fsf@rosalinde.fritz.box> <8738s4jvc4.fsf@mail.jurta.org> <87d2r7vqr7.fsf@rosalinde.fritz.box> Date: Sat, 29 Jun 2013 00:50:51 +0300 In-Reply-To: <87d2r7vqr7.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 27 Jun 2013 11:37:16 +0200") Message-ID: <871u7laogo.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14717 Cc: 14717@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> BTW, if you are interested what I'm trying to do in bug#14670 >> where I renamed the text property of footnotes from `link' to `shr-url' >> is to support shr-url links in Info. The value of the text properly >> `shr-url' is the target of the link. The problem is how to address >> a footnote? Maybe add a function that finds a footnote. But I'm afraid >> that supporting an arbitrary function on the text properly `shr-url' >> is too unsafe. So `shr-url' should contain only a string. The question >> is in what format to specify a link to a footnote. Currently it has >> the value `t'. Perhaps as a string it could contain a line number >> of the footnote like "(elisp) Using Interactive (line 42)". > > Would that mean the link would have to be manually updated whenever the > line number of the footnote in the file changes? If so, it seems > error-prone. But I don't know the implementation, maybe that's not an > issue. Otherwise, seems like an interesting idea. `Info-fontify-node' could calculate the line number dynamically before putting it to the text property `link', but since I have no idea in what format to put line numbers in links, I'll leave it unchanged for now. The main point for bug#14670 is to put a new condition that checks general links to `Info-try-follow-nearest-node' either after checking for footnotes, or before checking for footnotes but with an additional condition `(not (eq node t))' because for footnotes `Info-fontify-node' puts the text property `link' with the value `t' that should be skipped when the current link is a link to footnote and not a general link, so another existing `cond' branch will check whether text at point contains a link for footnote. I see no problems for footnotes after adding processing of general links with this patch: === modified file 'lisp/info.el' --- lisp/info.el 2013-06-27 09:20:04 +0000 +++ lisp/info.el 2013-06-27 23:31:27 +0000 @@ -3863,6 +3919,8 @@ (defun Info-try-follow-nearest-node (&op If FORK is non-nil, it is passed to `Info-goto-node'." (let (node) (cond + ((and (setq node (get-text-property (point) 'link)) (not (eq node t))) + (Info-goto-node node fork)) ((setq node (Info-get-token (point) "[hf]t?tps?://" "\\([hf]t?tps?://[^ \t\n\"`({<>})']+\\)")) (browse-url node) From unknown Sun Jun 15 08:38:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Jul 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator