all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: Karl Berry <karl@freefriends.org>
Subject: info.el dots in node names
Date: Thu, 05 Jun 2003 09:42:45 +1000	[thread overview]
Message-ID: <87adcxh0ju.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

[This started on the autoconf-patches list about dots in node names in
the autoconf manual, eg. "config.status".]

        * info.el (Info-following-node-name): Accept "." followed by allowed
        non-whitespace non-")" chars, so filenames like foo.h can be in node
        names.

The standalone info reader uses a similar rule (skip_node_characters
in info/search.c), though currently it includes the "." in "node.,",
which I'm not sure it should, in case someone puts a comma after an
@pxref (foo.texi below).

foo.texi below is a little sample I was testing with.  Notice with
this change that the cross references in the "something.txt" node
work, as does the index entry.  The top-level menu entry already
worked.


[-- Attachment #2: info.el.node-name-dots.diff --]
[-- Type: text/plain, Size: 2090 bytes --]

*** info.el.~1.350.~	Thu Jun  5 02:58:08 2003
--- info.el	Thu Jun  5 08:33:52 2003
*************** (defun Info-extract-pointer (name &optio
*** 1403,1415 ****
  (defun Info-following-node-name (&optional allowedchars)
    "Return the node name in the buffer following point.
  ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp
! saying which chars may appear in the node name."
    (skip-chars-forward " \t")
    (buffer-substring-no-properties
     (point)
     (progn
       (while (looking-at (concat "[" (or allowedchars "^,\t\n") "]"))
         (skip-chars-forward (concat (or allowedchars "^,\t\n") "("))
         (if (looking-at "(")
  	   (skip-chars-forward "^)")))
       (skip-chars-backward " ")
--- 1403,1433 ----
  (defun Info-following-node-name (&optional allowedchars)
    "Return the node name in the buffer following point.
  ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp
! saying which chars may appear in the node name.
! 
! If \".\" is not among the allowed chars, it will still be accepted if it (or
! a sequence of dots) is followed by a non-whitespace, non-\")\", allowed
! char.  A cross reference normally ends at a \".\", but this rule lets
! filenames like foo.h appear in the node name.  Note that it still correctly
! stops at the \".\" for things like the following which can arise from
! @pxref.
! 
!     *note something: node name., etc
!     (go to *note something: node name.) etc
! "
! 
!   ;; For reference, the standalone info reader applies a similar rule for
!   ;; ".", see texinfo info/search.c skip_node_characters().
!   
    (skip-chars-forward " \t")
    (buffer-substring-no-properties
     (point)
     (progn
       (while (looking-at (concat "[" (or allowedchars "^,\t\n") "]"))
         (skip-chars-forward (concat (or allowedchars "^,\t\n") "("))
+        (if (and (looking-at "\\.+[^) \t\n]")
+                 (looking-at (concat "\\.+[" (or allowedchars "^,\t\n") "]")))
+            (goto-char (match-end 0)))
         (if (looking-at "(")
  	   (skip-chars-forward "^)")))
       (skip-chars-backward " ")

[-- Attachment #3: foo.texi --]
[-- Type: application/x-texinfo, Size: 458 bytes --]

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2003-06-04 23:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04 23:42 Kevin Ryde [this message]
2003-06-05 21:46 ` info.el dots in node names Richard Stallman
2003-06-06 12:22   ` Andreas Schwab
2003-06-08  1:07     ` Richard Stallman
2003-06-06 22:16   ` Kevin Ryde
2003-06-06 23:41     ` Kevin Ryde
2003-06-06 23:58       ` Kevin Ryde
     [not found]         ` <200306070029.h570TdJL008307@rum.cs.yale.edu>
2003-06-07  0:50           ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87adcxh0ju.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=karl@freefriends.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.