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: Teddy Hogeborn <teddy <at> recompile.se>
Cc: 20704 <at> debbugs.gnu.org
Subject: bug#20704: info.el bug fix; Interprets Info format wrongly
Date: Mon, 01 Jun 2015 10:01:59 -0400
Thanks,

> +	      (+ (point-min) (byte-to-position
> +                              (read (current-buffer))))

Hmm... this only works if the Info file is encoded in UTF-8.
I guess in the case of Info, 99% of the files are just ASCII and there's
a chance that the vast majority of the rest is (or will be) UTF-8,
so maybe this hack works well in practice.

But I think we should define an `Info-bytepos-to-charpos' function for that.
It can be defined as an alias for byte-to-position, but at least it
concentrates this utf-8 assumption at a single place where we can place
a clear comment.


        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.