[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Info-index fails on node-name "~/.cvsrc"
From: |
Juri Linkov |
Subject: |
Re: Info-index fails on node-name "~/.cvsrc" |
Date: |
Tue, 18 May 2004 09:18:53 +0300 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Glenn Morris <address@hidden> writes:
> I noticed that Info-index now fails in the VM info pages (it works OK
> in 21.3). The index entries all take the format:
>
> * vm-move-messages-physically: Sorting Messages. 5.
>
> and a typical error message is:
>
> i sort -> "No such node or anchor: Sorting Messages. 5"
How did you produce this Info index in such non-standard format?
I tried to regenerate the VM Info file with an old version of
makeinfo and got:
* vm-move-messages-physically: Sorting Messages.
Then I tried to generate it with the latest version of makeinfo
and the result was:
* vm-move-messages-physically: Sorting Messages. (line 6)
But OK. Since you have Info pages in such format, we should find a
solution to support it.
Recently info.el was fixed to include periods into Info node names from
the Info index (like "~/.cvsrc"). But in your file the period is not
a part of the node name.
The stand-alone Info reader interprets the period with the following
whitespace as a terminating period. But it don't work with node names
where period with the following whitespace is a part of the node name,
like in abbreviations (e.g. "J. Random Hacker" from the Jargon file).
So I propose the following solution: if an Info node is not found and
its name contains the period, then try to find a node with a part
of the name after period removed.
Index: emacs/lisp/info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.394
diff -c -r1.394 info.el
*** emacs/lisp/info.el 27 Apr 2004 14:43:03 -0000 1.394
--- emacs/lisp/info.el 18 May 2004 04:47:27 -0000
***************
*** 863,871 ****
(let ((pos (Info-find-node-in-buffer regexp)))
(when pos
(goto-char pos)
! (throw 'foo t))
! ;; No such anchor in tag table or node in tag table or file
! (error "No such node or anchor: %s" nodename)))
(Info-select-node)
(goto-char (point-min))
--- 863,879 ----
(let ((pos (Info-find-node-in-buffer regexp)))
(when pos
(goto-char pos)
! (throw 'foo t)))
!
! (when (string-match "\\([^.]+\\)\\." nodename)
! (let (Info-point-loc)
! (Info-find-node-2
! filename (match-string 1 nodename) no-going-back))
! (widen)
! (throw 'foo t))
!
! ;; No such anchor in tag table or node in tag table or file
! (error "No such node or anchor: %s" nodename))
(Info-select-node)
(goto-char (point-min))
--
Juri Linkov
http://www.jurta.org/emacs/