unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Rupert Swarbrick <rswarbrick@gmail.com>
Cc: 36573@debbugs.gnu.org
Subject: bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
Date: Wed, 11 Aug 2021 20:42:08 +0200	[thread overview]
Message-ID: <87eeazq0vz.fsf@gnus.org> (raw)
In-Reply-To: <87o91zs2sm.fsf@halibut> (Rupert Swarbrick's message of "Fri, 12 Jul 2019 16:14:33 +0100")

Rupert Swarbrick <rswarbrick@gmail.com> writes:

> 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)

(etc)

Even with this setting, I'm not able to reproduce the problem.  It would
be helpful with a recipe, starting from "emacs -Q", to verify that we're
fixing this in the correct way.

> 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.

Well, manual does say that the coding system has to be known (which
implies that the line ending convention should also be known)...

> 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.

I think those functions probably shouldn't signal an error in this
situation if asked to do an approximate calculation (but just guess at a
one-byte ending), perhaps.  But give a better error message when asked
to do an exact calculation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2021-08-11 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 10:52 bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer Rupert Swarbrick
2019-07-10 14:52 ` Eli Zaretskii
2019-07-12 15:14 ` Rupert Swarbrick
2019-07-12 18:17   ` Eli Zaretskii
2021-08-11 18:42   ` Lars Ingebrigtsen [this message]
2021-08-12  8:21     ` Eli Zaretskii
2021-08-12 12:54       ` Lars Ingebrigtsen
2021-08-12 13:08         ` Eli Zaretskii
2021-08-13 11:07           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeazq0vz.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=36573@debbugs.gnu.org \
    --cc=rswarbrick@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).