unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 25626@debbugs.gnu.org
Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact'
Date: Sun, 5 Feb 2017 09:20:13 -0800 (PST)	[thread overview]
Message-ID: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> (raw)

The doc string says this:

  ‘exact’, in which case we may end up re-(en/de)coding a large
    part of the file/buffer.

And (elisp) `Text Representations' says this:

  ‘exact’
    The result must be accurate.  The function may need to encode
    and decode a large part of the buffer.

If I understand the code right, I think both of these are misleading.
They can give the impression that the text in the region can have its
encoding changed in its buffer.

But when `bufferpos-to-filepos' encodes some text it puts the resulting
text in a different, temporary buffer, and returns its position - the
original text (in the original buffer) does not have its encoding
changed.

Please consider clarifying this, so that it lets users know that the
encoding cost of `exact' is only one of performance and that the buffer
text is not changed in any way (in particular, its encoding is not
changed).

Or if I'm mistaken, and it does possibly change the encoding of some of
the buffer text, then please consider clarifying the doc to state this
explicitly.

In other words, please elaborate on (clarify) what is meant by "may need
to encode and decode a large part of the buffer" and "may end up
re-(en/de)coding a large part of the file/buffer".

In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-11-15
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --without-compress-install 'CFLAGS=-O2
 -static -g3''





             reply	other threads:[~2017-02-05 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 17:20 Drew Adams [this message]
2017-02-05 18:34 ` bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Eli Zaretskii
2017-02-05 18:58   ` Drew Adams
2017-02-05 19:56     ` Eli Zaretskii
     [not found] <<8d705983-882e-48fb-a171-3fa9f025ac4f@default>
     [not found] ` <<83tw887ahx.fsf@gnu.org>
     [not found]   ` <<bcc4886f-9b9b-4ab4-bc05-51cdbff5e639@default>
     [not found]     ` <<83mve076p9.fsf@gnu.org>
2017-02-05 20:22       ` Drew Adams

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=8d705983-882e-48fb-a171-3fa9f025ac4f@default \
    --to=drew.adams@oracle.com \
    --cc=25626@debbugs.gnu.org \
    /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).