From: Alan <wehmann@fnal.gov>
To: help-gnu-emacs@gnu.org
Subject: Re: Disappointed by texinfo @anchor construct
Date: Thu, 20 Nov 2014 20:01:03 -0800 (PST) [thread overview]
Message-ID: <10677ec0-c8fb-40db-9451-5f066f69ac62@googlegroups.com> (raw)
In-Reply-To: <mailman.14180.1416504607.1147.help-gnu-emacs@gnu.org>
On Thursday, November 20, 2014 11:30:10 AM UTC-6, Eli Zaretskii wrote:
> > Date: Wed, 19 Nov 2014 19:45:10 -0800 (PST)
> > From: Alan <wehmann_at_fnal.gov>
> >
> > I've been checking which makeinfo I am using. I did the latest testing with makeinfo from texinfo 5.2.
>
> Pick up an anchor that doesn't work, then visit the Info file
> literally, and look up that anchor in the Tag Table at the end of the
> file. It should have the byte offset near it. Check where does this
> byte offset point to in the file. If it points to the correct place,
> then makeinfo is innocent.
>
> Can you try with some other file, like wisent.info that comes with
> Emacs? I just tried there, and the anchor wisent-skip-token,
> referenced from the node "Error Recovery", works for me. Does it work
> for you?
The offset looks okay. I tried wisent.info and the problem remains.
I then decided to explore the operation of the code, with edebug. I record my observations below:
I explored code using edebug and found the critical section of code in
(defun Info-find-node-2
To be able to reference particular lines, I added a number at the beginning of each line:
1 ;; First, search a tag table, if any
2 (when (marker-position Info-tag-table-marker)
3 (let* ((m Info-tag-table-marker)
4 (found (Info-find-in-tag-table m regexp strict-case)))
5
6 (when found
7 ;; FOUND is (ANCHOR POS MODE).
8 (setq guesspos (nth 1 found))
9
10 ;; If this is an indirect file, determine which
11 ;; file really holds this node and read it in.
12 (unless (eq (nth 2 found) 'Info-mode)
13 ;; Note that the current buffer must be the
14 ;; *info* buffer on entry to
15 ;; Info-read-subfile. Thus the hackery above.
16 (setq guesspos (Info-read-subfile guesspos)))
17
18 ;; Handle anchor
19 (when (nth 0 found)
20 (goto-char (setq anchorpos guesspos))
21 (throw 'foo t)))))
I have a texinfo file of mine where I've added an anchor & then ran it through makeinfo. I looked at the tag table for that anchor in the info file and it has an offset that makes sense. I then examine what happens in the above section of code--using edebug--when I reference that anchor. At line 8 the guesspos is what I would regard as proper for the anchor. The test at line 12 fails because the mode recorded in "found" is "fundamental". Line 16 then changes guesspos to a value that doesn't correspond to the anchor.
My next task is to figure out why the mode recorded in "anchor" isn't 'Info-mode.
next prev parent reply other threads:[~2014-11-21 4:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 3:11 Disappointed by texinfo @anchor construct Alan
2014-11-17 16:40 ` Eli Zaretskii
[not found] ` <mailman.13899.1416242463.1147.help-gnu-emacs@gnu.org>
2014-11-18 22:23 ` Alan
2014-11-19 3:49 ` Eli Zaretskii
[not found] ` <mailman.13992.1416368997.1147.help-gnu-emacs@gnu.org>
2014-11-19 5:22 ` Alan
2014-11-19 15:39 ` Eli Zaretskii
[not found] ` <mailman.14029.1416411570.1147.help-gnu-emacs@gnu.org>
2014-11-20 3:45 ` Alan
2014-11-20 17:29 ` Eli Zaretskii
[not found] ` <mailman.14180.1416504607.1147.help-gnu-emacs@gnu.org>
2014-11-21 4:01 ` Alan [this message]
2014-11-21 4:16 ` Alan
2014-11-21 11:39 ` Alan
2014-11-22 23:19 ` Robert Thorpe
[not found] ` <mailman.14359.1416698366.1147.help-gnu-emacs@gnu.org>
2014-11-23 13:43 ` Alan
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10677ec0-c8fb-40db-9451-5f066f69ac62@googlegroups.com \
--to=wehmann@fnal.gov \
--cc=help-gnu-emacs@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).