GNU bug report logs -
#73638
31.0.50; doc-view: imenu index cannot be made for LaTeX PDFs
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Sat, 5 Oct 2024 11:07:02 UTC
Severity: normal
Found in version 31.0.50
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 73638 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
[திங்கள் அக்டோபர் 07, 2024] Tassilo Horn wrote:
> Visuwesh <visuweshm <at> gmail.com> writes:
>
>>>> Maybe it would also a good idea to use a :stderr buffer with
>>>> make-process and put its contents into the imenu-unavailable-error.
>>>> That way, chances are better we get the reason for failure delivered
>>>> in bug reports.
>>>
>>> I do not think it is worth the trouble since only syntax errors are
>>> likely to surface up in stderr which would be very unlikely. If the
>>> PDF file does not have an outline, there would be nothing printed by
>>> our script so end-of-file error should catch that case.
>>
>> Actually, this wasn't quite correct I think. We would have stray > in
>> the buffer and read would return the symbol >. I corrected that in
>> the attached.
>
> The patch looks good. But during testing, it seems that the index is
> always off by one page, i.e., the index for some section brings me to
> page 117 but the section heading is actually on page 118.
>
> I have that both with the Peter Atkins et al. book you suggested as well
> as with own papers which didn't work at all previously due to #nameddest
> references.
Ugghhh, looks like the page number returned by the JS function is
zero-indexed. Thanks for the catch (and sorry for the many mistakes and
hence the back-and-forth). Should be corrected in the attached patch.
[0001-Make-imenu-index-generation-for-PDFs-more-reliable.patch (text/x-diff, attachment)]
This bug report was last modified 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.