help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: workaround for Emacs out-of-sync with texinfo/Info index format


From: Jskud
Subject: FYI: workaround for Emacs out-of-sync with texinfo/Info index format
Date: Fri, 9 Nov 2007 21:18:49 -0800

Many Emacs releases are out of sync with texinfo when it comes to the
indexes created for Info files, leading to unexpected behavior when
navigating to index entries with the Info "i" command.

The Info index format optionally specifies the line in the Info node
which has the item being indexed, using the format (line nnn).  But most
Emacs info.el files (including Emacs 21.4) expect nnn, not (line nnn),
so Emacs ignore the starting line number, and just searches from the
beginning for the index entry.

For example, issuing "iprimes" (go to the index for primes) in Info
while in the Octave's info tree takes you to the entry for "factor",
since it is the first time in that node that "primes" is found.

The problem has been fixed in later Emacs's, at least since CVS
2007.0609.  This posting is to let other Octave users know that there is
an Emacs problem and how they can work around it.  I don't expect any
changes in Octave because of this.

One solution is to remove info.elc, and apply this patch, based on the
CVS 2007.0609 Emacs version, to info.el, illustrated for Emacs 21.3.

--- SUPERCEDED/info.el  2001-12-21 11:08:17.000000000 -0800
+++ info.el     2007-11-08 23:32:33.000000000 -0800
@@ -1830,7 +1830,8 @@
   (interactive "sIndex topic: ")
   (let ((orignode Info-current-node)
        (rnode nil)
-       (pattern (format "\n\\* +\\([^\n:]*%s[^\n:]*\\):[ \t]*\\([^.\n]*\\)\\.[ 
\t]*\\([0-9]*\\)"
+       ;;--(pattern (format "\n\\* +\\([^\n:]*%s[^\n:]*\\):[ 
\t]*\\([^.\n]*\\)\\.[ \t]*\\([0-9]*\\)"
+       (pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ 
\t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?"
                         (regexp-quote topic)))
        node
        (case-fold-search t))

This issue was originally posted on "address@hidden", but should have
been posted here on "address@hidden".  Hence, the cross-posting.

FYI.  /Jskud


reply via email to

[Prev in Thread] Current Thread [Next in Thread]