emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#25626: closed (25.1; doc of `bufferpos-to-filepos'


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#25626: closed (25.1; doc of `bufferpos-to-filepos' for type `exact')
Date: Sun, 05 Feb 2017 19:57:01 +0000

Your message dated Sun, 05 Feb 2017 21:56:02 +0200
with message-id <address@hidden>
and subject line Re: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type 
`exact'
has caused the debbugs.gnu.org bug report #25626,
regarding 25.1; doc of `bufferpos-to-filepos' for type `exact'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
25626: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25626
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.1; doc of `bufferpos-to-filepos' for type `exact' Date: Sun, 5 Feb 2017 09:20:13 -0800 (PST)
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''



--- End Message ---
--- Begin Message --- Subject: Re: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Date: Sun, 05 Feb 2017 21:56:02 +0200
> Date: Sun, 5 Feb 2017 10:58:24 -0800 (PST)
> From: Drew Adams <address@hidden>
> Cc: address@hidden
> 
> > This text simply says that this option might be computationally
> > expensive.
> 
> If that's the intent then say that.  And I think it is the
> intent, hence this bug: please just say that.

Done.

> [There are also typos in the doc string of `encode-coding-region':
> "Optional 4th arguments" should be "Optional 4th argument" and
> "is replace by" should be "is replaced by".]

Fixed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]