GNU bug report logs - #36573
26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer

Previous Next

Package: emacs;

Reported by: Rupert Swarbrick <rswarbrick <at> gmail.com>

Date: Wed, 10 Jul 2019 10:56:01 UTC

Severity: normal

Found in version 26.1

Fixed in version 28.1

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: Eli Zaretskii <eliz <at> gnu.org>
To: Rupert Swarbrick <rswarbrick <at> gmail.com>
Cc: 36573 <at> debbugs.gnu.org
Subject: bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
Date: Fri, 12 Jul 2019 21:17:47 +0300
> From: Rupert Swarbrick <rswarbrick <at> gmail.com>
> Date: Fri, 12 Jul 2019 16:14:33 +0100
> 
> Thank you for the reply. I've now found the "culprit" (bisecting 
> my init.el starting with emacs -Q). The dubious setting was:
> 
>   '(file-coding-system-alist
>      (quote
>       (("\\.dz\\'" no-conversion . no-conversion)
>        ("\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.tgz\\'" no-conversion . no-conversion)
>        ("\\.tbz\\'" no-conversion . no-conversion)
>        ("\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.elc\\'" emacs-mule . emacs-mule)
>        ("\\.utf\\(-8\\)?\\'" . utf-8)
>        ("\\(\\`\\|/\\)loaddefs.el\\'" raw-text . raw-text-unix)
>        ("\\.tar\\'" no-conversion . no-conversion)
>        ("\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
>        ("\\.lisp\\'" . utf-8-unix))))

Was the Info file compressed, i.e. did it have one of extensions that
caused no-conversion to be used?

> I think it probably still makes sense to add a note to the manual 
> for bufferpos-to-filepos and filepos-to-bufferpos to point out 
> that they don't work if the line ending convention is unknown.
> 
> For bonus points, maybe it makes sense to add something to fail 
> earlier (and more understandably!) in the info reading code. I'm 
> not sure exactly where that would be, though.

Yes, something should be done there, thanks.




This bug report was last modified 3 years and 345 days ago.

Previous Next


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