[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disappointed by texinfo @anchor construct
From: |
Alan |
Subject: |
Re: Disappointed by texinfo @anchor construct |
Date: |
Thu, 20 Nov 2014 20:01:03 -0800 (PST) |
User-agent: |
G2/1.0 |
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.
- Disappointed by texinfo @anchor construct, Alan, 2014/11/16
- Re: Disappointed by texinfo @anchor construct, Eli Zaretskii, 2014/11/17
- Message not available
- Re: Disappointed by texinfo @anchor construct, Alan, 2014/11/18
- Re: Disappointed by texinfo @anchor construct, Eli Zaretskii, 2014/11/18
- Message not available
- Re: Disappointed by texinfo @anchor construct, Alan, 2014/11/19
- Re: Disappointed by texinfo @anchor construct, Eli Zaretskii, 2014/11/19
- Message not available
- Re: Disappointed by texinfo @anchor construct, Alan, 2014/11/19
- Re: Disappointed by texinfo @anchor construct, Eli Zaretskii, 2014/11/20
- Message not available
- Re: Disappointed by texinfo @anchor construct,
Alan <=
- Message not available
- Re: Disappointed by texinfo @anchor construct, Alan, 2014/11/20
Re: Disappointed by texinfo @anchor construct, Alan, 2014/11/21