all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9824: Info fails to follow multi-line links to manuals with dots
@ 2011-10-21 14:10 Juri Linkov
  2011-10-21 17:41 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2011-10-21 14:10 UTC (permalink / raw)
  To: 9824

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.







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9824: Info fails to follow multi-line links to manuals with dots
  2011-10-21 14:10 bug#9824: Info fails to follow multi-line links to manuals with dots Juri Linkov
@ 2011-10-21 17:41 ` Stefan Monnier
  2011-10-24  5:47   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2011-10-21 17:41 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 9824

> The following patch makes the regexp for leading space more permissive
> by allowing newlines in leading space:

Looks acceptable,


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9824: Info fails to follow multi-line links to manuals with dots
  2011-10-21 17:41 ` Stefan Monnier
@ 2011-10-24  5:47   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2011-10-24  5:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 9824-done

>> The following patch makes the regexp for leading space more permissive
>> by allowing newlines in leading space:
>
> Looks acceptable,

Installed.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-24  5:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-21 14:10 bug#9824: Info fails to follow multi-line links to manuals with dots Juri Linkov
2011-10-21 17:41 ` Stefan Monnier
2011-10-24  5:47   ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.