GNU bug report logs - #20704
info.el bug fix; Interprets Info format wrongly

Previous Next

Package: emacs;

Reported by: Teddy Hogeborn <teddy <at> recompile.se>

Date: Sun, 31 May 2015 17:53:03 UTC

Severity: normal

Tags: patch

Merged with 13431

Found in version 24.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: teddy <at> recompile.se, 20704 <at> debbugs.gnu.org
Subject: bug#20704: info.el bug fix; Interprets Info format wrongly
Date: Wed, 10 Jun 2015 23:02:16 -0400
> But Texinfo 5.x and later does count the CR characters, so the
> stand-alone Info reader was recently changed to account for that.
> Which means that Emacs will now have a problem, whereby the byte
> counts in the tag tables will be inaccurate, and our only hope is the
> 1000-character tolerance we use to look for the node around the
> position stated in the tag table will be large enough.

If needed, I think we could make it work reasonably cheaply with
something along the lines of (100% guaranteed untested code):

       (let (pos lines (eol-offset 0))
         (while
             (progn
               (setq pos (byte-to-position (+ pm byte (- eol-offset))))
               (setq lines (1- (line-number-at-pos pos)))
               (not (= lines eol-offset)))
           (setq eol-offset (+ eol-offset lines)))
         pos))


-- Stefan




This bug report was last modified 5 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.