Subject: Re: bug#20704: info.el bug fix; Interprets Info format wrongly

From: Stefan Monnier <[email-masked]>
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