From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Info-index fails on node-name "~/.cvsrc" Date: Tue, 18 May 2004 09:18:53 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87k6zamf5e.fsf@mail.jurta.org> References: <200404221659.i3MGxBx20232@f7.net> <8765bohe4i.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084861487 7376 80.91.224.253 (18 May 2004 06:24:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 May 2004 06:24:47 +0000 (UTC) Cc: Karl Berry Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 18 08:24:42 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPy1q-0004O3-00 for ; Tue, 18 May 2004 08:24:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPy1p-0001QU-00 for ; Tue, 18 May 2004 08:24:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPxyq-0007b8-8q for emacs-devel@quimby.gnus.org; Tue, 18 May 2004 02:21:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BPxyX-0007aa-Ve for emacs-devel@gnu.org; Tue, 18 May 2004 02:21:18 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BPxy0-0007V3-Jh for emacs-devel@gnu.org; Tue, 18 May 2004 02:21:16 -0400 Original-Received: from [66.33.219.19] (helo=spoon.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BPxy0-0007Uu-37 for emacs-devel@gnu.org; Tue, 18 May 2004 02:20:44 -0400 Original-Received: from mail.jurta.org (80-235-33-218-dsl.mus.estpak.ee [80.235.33.218]) by spoon.dreamhost.com (Postfix) with ESMTP id C796D13D89A; Mon, 17 May 2004 23:20:41 -0700 (PDT) Original-To: emacs-devel@gnu.org In-Reply-To: (Glenn Morris's message of "Mon, 17 May 2004 16:29:56 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23615 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23615 Glenn Morris 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/