unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25626@debbugs.gnu.org
Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact'
Date: Sun, 5 Feb 2017 10:58:24 -0800 (PST)	[thread overview]
Message-ID: <bcc4886f-9b9b-4ab4-bc05-51cdbff5e639@default> (raw)
In-Reply-To: <83tw887ahx.fsf@gnu.org>

> >   ‘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.
> 
> I don't understand how you get that impression.  You do know that
> encoding text and then decoding it back produces the same text as was
> there originally, right?
> 
> 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.

Saying "we may end up re-(en/de)coding" and "may need to
encode and decode" does _not_ specify that the text is encoded
_and then_ decoded back again, resulting in no change to the
buffer.  And the former means re-encode OR re-decode, not AND.)

And in fact, IIUC, the text is encoded to a separate buffer
(arg DESTINATION of `encode-coding-region'); it is not encoded
in the original buffer - the text in that buffer is unaffected,
and not because it is encoded and then decoded back.  But
perhaps I misunderstand this part.

[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".]





  reply	other threads:[~2017-02-05 18:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 17:20 bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Drew Adams
2017-02-05 18:34 ` Eli Zaretskii
2017-02-05 18:58   ` Drew Adams [this message]
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=bcc4886f-9b9b-4ab4-bc05-51cdbff5e639@default \
    --to=drew.adams@oracle.com \
    --cc=25626@debbugs.gnu.org \
    --cc=eliz@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).