unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 36573@debbugs.gnu.org, rswarbrick@gmail.com
Subject: bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
Date: Thu, 12 Aug 2021 11:21:07 +0300	[thread overview]
Message-ID: <831r6zdqfg.fsf@gnu.org> (raw)
In-Reply-To: <87eeazq0vz.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed,  11 Aug 2021 20:42:08 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 11 Aug 2021 20:42:08 +0200
> Cc: 36573@debbugs.gnu.org
> 
> > 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.

I think, since these cases are very rare, it should be okay to assume
the -unix EOL type when this happens, and document that if this is the
case, the result could be an approximation even if the exact result
was requested.





  reply	other threads:[~2021-08-12  8:21 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
2021-08-12  8:21     ` Eli Zaretskii [this message]
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=831r6zdqfg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36573@debbugs.gnu.org \
    --cc=larsi@gnus.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).