From unknown Sat Sep 06 07:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2017 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25626@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148631523026686 (code B ref -1); Sun, 05 Feb 2017 17:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Feb 2017 17:20:30 +0000 Received: from localhost ([127.0.0.1]:56836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caQUH-0006wM-LI for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caQUF-0006w9-SZ for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caQU9-0002cl-Vh for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caQU9-0002cP-SW for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caQU8-0007LJ-TS for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caQU5-0002ZB-Mj for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:20 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:19659) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caQU5-0002YQ-CT for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:17 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v15HKEgd015905 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Feb 2017 17:20:14 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v15HKE3V025151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Feb 2017 17:20:14 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v15HKEYR024411 for ; Sun, 5 Feb 2017 17:20:14 GMT MIME-Version: 1.0 Message-ID: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> Date: Sun, 5 Feb 2017 09:20:13 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) The doc string says this: =E2=80=98exact=E2=80=99, in which case we may end up re-(en/de)coding a l= arge part of the file/buffer. And (elisp) `Text Representations' says this: =E2=80=98exact=E2=80=99 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=3D-O2 -static -g3'' From unknown Sat Sep 06 07:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2017 18:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 25626@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 25626-submit@debbugs.gnu.org id=B25626.1486319663785 (code B ref 25626); Sun, 05 Feb 2017 18:35:01 +0000 Received: (at 25626) by debbugs.gnu.org; 5 Feb 2017 18:34:23 +0000 Received: from localhost ([127.0.0.1]:56863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caRdn-0000Cb-Dm for submit@debbugs.gnu.org; Sun, 05 Feb 2017 13:34:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caRdm-0000CP-98 for 25626@debbugs.gnu.org; Sun, 05 Feb 2017 13:34:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caRdc-0004qP-7v for 25626@debbugs.gnu.org; Sun, 05 Feb 2017 13:34:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caRdc-0004qI-4z; Sun, 05 Feb 2017 13:34:12 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3758 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1caRda-0008Bz-SR; Sun, 05 Feb 2017 13:34:11 -0500 Date: Sun, 05 Feb 2017 20:34:02 +0200 Message-Id: <83tw887ahx.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> (message from Drew Adams on Sun, 5 Feb 2017 09:20:13 -0800 (PST)) References: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 5 Feb 2017 09:20:13 -0800 (PST) > From: Drew Adams > > 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. 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. From unknown Sat Sep 06 07:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2017 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 25626@debbugs.gnu.org Received: via spool by 25626-submit@debbugs.gnu.org id=B25626.14863211162957 (code B ref 25626); Sun, 05 Feb 2017 18:59:02 +0000 Received: (at 25626) by debbugs.gnu.org; 5 Feb 2017 18:58:36 +0000 Received: from localhost ([127.0.0.1]:56893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caS1E-0000lc-2f for submit@debbugs.gnu.org; Sun, 05 Feb 2017 13:58:36 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:20714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caS1C-0000lQ-8P for 25626@debbugs.gnu.org; Sun, 05 Feb 2017 13:58:34 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v15IwQvG009164 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 5 Feb 2017 18:58:27 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v15IwQxI023674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 5 Feb 2017 18:58:26 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v15IwPa1031032; Sun, 5 Feb 2017 18:58:25 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 5 Feb 2017 10:58:24 -0800 (PST) From: Drew Adams References: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> <83tw887ahx.fsf@gnu.org> In-Reply-To: <83tw887ahx.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.2 (----) > > =E2=80=98exact=E2=80=99, in which case we may end up re-(en/de)coding= a large > > part of the file/buffer. > > > > And (elisp) `Text Representations' says this: > > > > =E2=80=98exact=E2=80=99 > > 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. >=20 > 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? >=20 > 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".] From unknown Sat Sep 06 07:59:00 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#25626: closed (Re: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact') Message-ID: References: <83mve076p9.fsf@gnu.org> <8d705983-882e-48fb-a171-3fa9f025ac4f@default> X-Gnu-PR-Message: they-closed 25626 X-Gnu-PR-Package: emacs Reply-To: 25626@debbugs.gnu.org Date: Sun, 05 Feb 2017 19:57:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1486324621-8244-1" This is a multi-part message in MIME format... ------------=_1486324621-8244-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25626@debbugs.gnu.org. --=20 25626: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25626 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1486324621-8244-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25626-done) by debbugs.gnu.org; 5 Feb 2017 19:56:22 +0000 Received: from localhost ([127.0.0.1]:56944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caSv7-000287-Vv for submit@debbugs.gnu.org; Sun, 05 Feb 2017 14:56:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caSv6-00027w-Ql for 25626-done@debbugs.gnu.org; Sun, 05 Feb 2017 14:56:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caSuy-0005nj-HX for 25626-done@debbugs.gnu.org; Sun, 05 Feb 2017 14:56:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caSuy-0005nZ-E9; Sun, 05 Feb 2017 14:56:12 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3961 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1caSux-00028z-2T; Sun, 05 Feb 2017 14:56:12 -0500 Date: Sun, 05 Feb 2017 21:56:02 +0200 Message-Id: <83mve076p9.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: (message from Drew Adams on Sun, 5 Feb 2017 10:58:24 -0800 (PST)) Subject: Re: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' References: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> <83tw887ahx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25626-done Cc: 25626-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 5 Feb 2017 10:58:24 -0800 (PST) > From: Drew Adams > Cc: 25626@debbugs.gnu.org > > > 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. ------------=_1486324621-8244-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Feb 2017 17:20:30 +0000 Received: from localhost ([127.0.0.1]:56836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caQUH-0006wM-LI for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caQUF-0006w9-SZ for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caQU9-0002cl-Vh for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caQU9-0002cP-SW for submit@debbugs.gnu.org; Sun, 05 Feb 2017 12:20:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caQU8-0007LJ-TS for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caQU5-0002ZB-Mj for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:20 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:19659) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caQU5-0002YQ-CT for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 12:20:17 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v15HKEgd015905 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Feb 2017 17:20:14 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v15HKE3V025151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Feb 2017 17:20:14 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v15HKEYR024411 for ; Sun, 5 Feb 2017 17:20:14 GMT MIME-Version: 1.0 Message-ID: <8d705983-882e-48fb-a171-3fa9f025ac4f@default> Date: Sun, 5 Feb 2017 09:20:13 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 25.1; doc of `bufferpos-to-filepos' for type `exact' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) The doc string says this: =E2=80=98exact=E2=80=99, in which case we may end up re-(en/de)coding a l= arge part of the file/buffer. And (elisp) `Text Representations' says this: =E2=80=98exact=E2=80=99 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=3D-O2 -static -g3'' ------------=_1486324621-8244-1-- From unknown Sat Sep 06 07:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25626: 25.1; doc of `bufferpos-to-filepos' for type `exact' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2017 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Drew Adams Cc: 25626-done@debbugs.gnu.org Received: via spool by 25626-done@debbugs.gnu.org id=D25626.148632617310510 (code D ref 25626); Sun, 05 Feb 2017 20:23:02 +0000 Received: (at 25626-done) by debbugs.gnu.org; 5 Feb 2017 20:22:53 +0000 Received: from localhost ([127.0.0.1]:56952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caTKn-0002jS-6S for submit@debbugs.gnu.org; Sun, 05 Feb 2017 15:22:53 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:45748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caTKl-0002jH-RQ for 25626-done@debbugs.gnu.org; Sun, 05 Feb 2017 15:22:52 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v15KMhup030058 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 5 Feb 2017 20:22:45 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v15KMgtt013681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 Feb 2017 20:22:43 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v15KMdem022450; Sun, 5 Feb 2017 20:22:41 GMT MIME-Version: 1.0 Message-ID: <2e1040df-b55e-46b2-a3fd-1e2df6e9fcad@default> Date: Sun, 5 Feb 2017 12:22:38 -0800 (PST) From: Drew Adams References: <<8d705983-882e-48fb-a171-3fa9f025ac4f@default>> <<83tw887ahx.fsf@gnu.org>> <> <<83mve076p9.fsf@gnu.org>> In-Reply-To: <<83mve076p9.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) > > > 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. >=20 > Done. >=20 > > [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".] >=20 > Fixed. Thank you.