From unknown Sun Sep 14 01:17:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9824: Info fails to follow multi-line links to manuals with dots Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Oct 2011 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9824@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131920637725184 (code B ref -1); Fri, 21 Oct 2011 14:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Oct 2011 14:12:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHFqC-0006Y4-6m for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:12:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHFqA-0006Xg-AE for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHFor-0008L1-DX for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:11:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:33839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFor-0008Kw-C3 for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:11:33 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFoq-0004TW-EA for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHFop-0008KY-8e for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:32 -0400 Received: from smarty.dreamhost.com ([208.113.175.8]:40527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFop-0008KT-4Y for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:31 -0400 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 9408D6E809E for ; Fri, 21 Oct 2011 07:11:29 -0700 (PDT) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E9DC1451C452 for ; Fri, 21 Oct 2011 07:11:28 -0700 (PDT) From: Juri Linkov Organization: JURTA Date: Fri, 21 Oct 2011 17:10:27 +0300 Message-ID: <878voehe1x.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) For example, clicking on the following link fails to navigate to another Info manual: languages, are documented in a separate manual. *Note Introduction: (gccint-4.4)Top. because a regexp for leading space in `Info-following-node-name-re' doesn't take into account multi-line case. Links to manuals without dots in the file name currently work just by accident, e.g. clicking on: are performed by running the function. *Note What Is a Function: (elisp)What Is a Function. works because the regexp for unallowed chars in node names doesn't contain parens (but contains dots) and matches everything including file names (without dots). This is wrong but I hesitate to make the regexp more restrictive by disallowing parens in node names because Info currently using regexp matching extensively is very brittle. The following patch makes the regexp for leading space more permissive by allowing newlines in leading space: === modified file 'lisp/info.el' --- lisp/info.el 2011-09-24 19:18:43 +0000 +++ lisp/info.el 2011-10-21 14:10:04 +0000 @@ -2020,7 +2020,7 @@ (defun Info-following-node-name-re (&opt Submatch 2 if non-nil is the parenthesized file name part of the node name. Submatch 3 is the local part of the node name. End of submatch 0, 1, and 3 are the same, so you can safely concat." - (concat "[ \t]*" ;Skip leading space. + (concat "[ \t\n]*" ;Skip leading space. "\\(\\(([^)]+)\\)?" ;Node name can start with a file name. "\\([" (or allowedchars "^,\t\n") "]*" ;Any number of allowed chars. "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space. From unknown Sun Sep 14 01:17:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9824: Info fails to follow multi-line links to manuals with dots Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Oct 2011 17:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 9824@debbugs.gnu.org Received: via spool by 9824-submit@debbugs.gnu.org id=B9824.131921899516812 (code B ref 9824); Fri, 21 Oct 2011 17:44:02 +0000 Received: (at 9824) by debbugs.gnu.org; 21 Oct 2011 17:43:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHJ7i-0004N6-Qk for submit@debbugs.gnu.org; Fri, 21 Oct 2011 13:43:15 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHJ7g-0004Mt-M1 for 9824@debbugs.gnu.org; Fri, 21 Oct 2011 13:43:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAA2uoU5MCqLO/2dsb2JhbABDqR6BBoFuAQEEAVYjBQsLNBIUGA0kiBO0FIhABKEyhEU X-IronPort-AV: E=Sophos;i="4.69,387,1315195200"; d="scan'208";a="143620725" Received: from 76-10-162-206.dsl.teksavvy.com (HELO pastel.home) ([76.10.162.206]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 21 Oct 2011 13:41:52 -0400 Received: by pastel.home (Postfix, from userid 20848) id B2F5E591FD; Fri, 21 Oct 2011 13:41:51 -0400 (EDT) From: Stefan Monnier Message-ID: References: <878voehe1x.fsf@mail.jurta.org> Date: Fri, 21 Oct 2011 13:41:51 -0400 In-Reply-To: <878voehe1x.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 21 Oct 2011 17:10:27 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > The following patch makes the regexp for leading space more permissive > by allowing newlines in leading space: Looks acceptable, Stefan From unknown Sun Sep 14 01:17:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Juri Linkov Subject: bug#9824: closed (Re: bug#9824: Info fails to follow multi-line links to manuals with dots) Message-ID: References: <87pqhnc54n.fsf@mail.jurta.org> <878voehe1x.fsf@mail.jurta.org> X-Gnu-PR-Message: they-closed 9824 X-Gnu-PR-Package: emacs Reply-To: 9824@debbugs.gnu.org Date: Mon, 24 Oct 2011 05:53:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1319435583-16837-1" This is a multi-part message in MIME format... ------------=_1319435583-16837-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9824: Info fails to follow multi-line links to manuals with dots which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9824@debbugs.gnu.org. --=20 9824: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9824 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1319435583-16837-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9824-done) by debbugs.gnu.org; 24 Oct 2011 05:52:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIDSb-0004Md-0h for submit@debbugs.gnu.org; Mon, 24 Oct 2011 01:52:33 -0400 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIDSZ-0004MW-Vt for 9824-done@debbugs.gnu.org; Mon, 24 Oct 2011 01:52:32 -0400 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 6873D6E8063; Sun, 23 Oct 2011 22:51:01 -0700 (PDT) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 908C1451C375; Sun, 23 Oct 2011 22:51:00 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#9824: Info fails to follow multi-line links to manuals with dots Organization: JURTA References: <878voehe1x.fsf@mail.jurta.org> Date: Mon, 24 Oct 2011 08:47:52 +0300 In-Reply-To: (Stefan Monnier's message of "Fri, 21 Oct 2011 13:41:51 -0400") Message-ID: <87pqhnc54n.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 9824-done Cc: 9824-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) >> The following patch makes the regexp for leading space more permissive >> by allowing newlines in leading space: > > Looks acceptable, Installed. ------------=_1319435583-16837-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Oct 2011 14:12:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHFqC-0006Y4-6m for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:12:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHFqA-0006Xg-AE for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHFor-0008L1-DX for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:11:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:33839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFor-0008Kw-C3 for submit@debbugs.gnu.org; Fri, 21 Oct 2011 10:11:33 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFoq-0004TW-EA for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHFop-0008KY-8e for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:32 -0400 Received: from smarty.dreamhost.com ([208.113.175.8]:40527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHFop-0008KT-4Y for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 10:11:31 -0400 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 9408D6E809E for ; Fri, 21 Oct 2011 07:11:29 -0700 (PDT) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E9DC1451C452 for ; Fri, 21 Oct 2011 07:11:28 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Info fails to follow multi-line links to manuals with dots Organization: JURTA Date: Fri, 21 Oct 2011 17:10:27 +0300 Message-ID: <878voehe1x.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) For example, clicking on the following link fails to navigate to another Info manual: languages, are documented in a separate manual. *Note Introduction: (gccint-4.4)Top. because a regexp for leading space in `Info-following-node-name-re' doesn't take into account multi-line case. Links to manuals without dots in the file name currently work just by accident, e.g. clicking on: are performed by running the function. *Note What Is a Function: (elisp)What Is a Function. works because the regexp for unallowed chars in node names doesn't contain parens (but contains dots) and matches everything including file names (without dots). This is wrong but I hesitate to make the regexp more restrictive by disallowing parens in node names because Info currently using regexp matching extensively is very brittle. The following patch makes the regexp for leading space more permissive by allowing newlines in leading space: === modified file 'lisp/info.el' --- lisp/info.el 2011-09-24 19:18:43 +0000 +++ lisp/info.el 2011-10-21 14:10:04 +0000 @@ -2020,7 +2020,7 @@ (defun Info-following-node-name-re (&opt Submatch 2 if non-nil is the parenthesized file name part of the node name. Submatch 3 is the local part of the node name. End of submatch 0, 1, and 3 are the same, so you can safely concat." - (concat "[ \t]*" ;Skip leading space. + (concat "[ \t\n]*" ;Skip leading space. "\\(\\(([^)]+)\\)?" ;Node name can start with a file name. "\\([" (or allowedchars "^,\t\n") "]*" ;Any number of allowed chars. "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space. ------------=_1319435583-16837-1--