From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Don't complain about changed file when it hasn't changed Date: Tue, 30 Aug 2016 11:23:31 -0400 Message-ID: <7a3d27a5-9dc2-4f6c-3f4a-0265f918aa4a@gmail.com> References: <031d3e59-eaa3-df7a-492d-2a2d3c726094@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gi9EaQhPmlxcVvXbCVPMt5LjrFhvHG9gM" X-Trace: blaine.gmane.org 1472571010 20552 195.159.176.226 (30 Aug 2016 15:30:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2016 15:30:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 30 17:30:05 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bekzE-0004fi-97 for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2016 17:30:04 +0200 Original-Received: from localhost ([::1]:49659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bekzB-0001eL-QN for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2016 11:30:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bekyC-0001az-KG for emacs-devel@gnu.org; Tue, 30 Aug 2016 11:29:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beky8-0005xB-Jh for emacs-devel@gnu.org; Tue, 30 Aug 2016 11:29:00 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:60410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beky8-0005x7-9o for emacs-devel@gnu.org; Tue, 30 Aug 2016 11:28:56 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0MHcm8-1bfrLb3mgu-003OZ7 for ; Tue, 30 Aug 2016 17:23:40 +0200 In-Reply-To: X-Provags-ID: V03:K0:7i8diom6II4AeJW+yk6iUsz7y+jKiyc9idLn9nQHVp2PJYNx9Ex gIeN3P69cRmb7uvYk8RuRDTvKoNgjyoxrpxXl4kt1oT2OnpgRtFu8E/OftJxFchSNoV7Y8k hr/qCTiyPiFolFyIHz2D/tXEUoLtkWGo7MD3B9oJQC4WHx6iztUpJouevF+Yldo9MindIn8 tikDRlPWB+QQMgqK1rDvQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:wHj9PzYtYvE=:YNdpYOYiamvZh15BMEbMZ0 6Cd0G1hKnuqIX4B/HGWvRTapvZfLDGgPLNArxqRglACL3027wkONT7XFPyLIgAoZphEDGUAgl XBAlw7EP+9VytvkJWJqIAWG6DSx4dXeFAmlTR1n8QyDGDH23ssF1hAsCLm17uZNtYy3nHM0vU IyxBeHvsvdBLVKFRa2XTiJ2b+WsbZzCE0FLORNClSxpiFb+H9lY7hs1rjih7mw7XSHBDsm7YA AznqZLA5b/8eQVhQFi01vQQ3nK3o1G3731rrHrzDQwptokNNXPqZjC25ZxI9zRDJyQdt1vPkC KHj/fC9FhLk1U+VHJPGxkfW71QrhgX9zaktIYyNitZQDqQ4CpQ4+asbiHroDcC+6VXpwpQX4+ YdgEBxAhIdyS4VOLyZC1SnbucIsps/denfub/oF3CkYmAyUkyzAGxk3qgNm7iCT62ZTFdUPSU lK0m2iuSklKucQjJc8h20tw6lD5Wmh2SzM9rgmdnHnLLdsKps1DNV21Q/LNBl2k+WqMd7Vu7v wInyQLByUjRSq0COWMxNmOisH8bTr+FoeRw4WPkwY9EelIoUxMEznR5BeizOSfcQO9GV76SjU DNER8cGcGzx/k2sVzmTEmd8urTfpEAK7XBsWZ3gtUdeQ55RJsv4cFkcgg4ezEH9sIBargq7YH 0ndS1IDp8svXCYi90v22teSUg7+sDvGLdxs4ZALTe/AaIsy4Ox8F1VMsSu+sHMkj2xGs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206943 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gi9EaQhPmlxcVvXbCVPMt5LjrFhvHG9gM Content-Type: multipart/mixed; boundary="Tj6sNwxqeB9AAM9Xv0c4AVNgFtDMKqsr1"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <7a3d27a5-9dc2-4f6c-3f4a-0265f918aa4a@gmail.com> Subject: Re: Don't complain about changed file when it hasn't changed References: <031d3e59-eaa3-df7a-492d-2a2d3c726094@gmail.com> In-Reply-To: --Tj6sNwxqeB9AAM9Xv0c4AVNgFtDMKqsr1 Content-Type: multipart/mixed; boundary="------------61731A97EF404F63BED0091D" This is a multi-part message in MIME format. --------------61731A97EF404F63BED0091D Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-08-30 11:01, Stefan Monnier wrote: >> Also, why not just introduce a function buffer-min, instead of the >> (save-restriction) + (widen) dance? >=20 > We could, yes. >=20 > Note that it wouldn't help us in the present case, since we will look > (via compare-buffer-substring) at the whole buffer's text, so we need t= o > widen anyway. I see, thanks! I didn't realize that these functions needed widening. Its= documentation doesn't seem to mention it, nor its docstring. What about = the attached patch? --------------61731A97EF404F63BED0091D Content-Type: text/x-diff; name="0001-Mention-that-compare-buffer-substrings-can-throw-arg.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Mention-that-compare-buffer-substrings-can-throw-arg.pa"; filename*1="tch" =46rom d64d57cdee65775345fcd1511d2e1e9ac4539a42 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Cl=3DC3=3DA9ment=3D20Pit--Claudel?=3D Date: Tue, 30 Aug 2016 11:20:10 -0400 Subject: [PATCH] ; Mention that compare-buffer-substrings can throw args-out-of-range * doc/lispref/text.texi: Mention args-out-of-range. --- doc/lispref/text.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 213eec9..9f2ca11 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -340,9 +340,11 @@ Comparing Text This function lets you compare two substrings of the same buffer or two different buffers. The first three arguments specify one substring, giving a buffer (or a buffer name) and two positions within the -buffer. The last three arguments specify the other substring in the -same way. You can use @code{nil} for @var{buffer1}, @var{buffer2}, or -both to stand for the current buffer. +buffer. If these positions are not in the accessible portion of the +buffer, @code{compare-buffer-substrings} signals an +@code{args-out-of-range} error. The last three arguments specify the +other substring in the same way. You can use @code{nil} for +@var{buffer1}, @var{buffer2}, or both to stand for the current buffer. =20 The value is negative if the first substring is less, positive if the first is greater, and zero if they are equal. The absolute value of --=20 2.7.4 --------------61731A97EF404F63BED0091D-- --Tj6sNwxqeB9AAM9Xv0c4AVNgFtDMKqsr1-- --gi9EaQhPmlxcVvXbCVPMt5LjrFhvHG9gM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXxaTzAAoJEPqg+cTm90wjG3oQAKar7k7vUqD/WCt2j62e92ZT m1py4YDOVWYYvmWsKk+Cy42N/DnaCopl6oGg9vNShG63UmNfjAzEPdb+Wa+xfBN2 Pjqmj+G+V895tSQc7F/1m0uwc25Er0mhDgEGqF9gWTEdNrMJUAJVol5wSehWm3gX clWw+7PrbbF32ABjuloCW3MJqemo+JQv44cmV+IAgiwMO4XYWFUnXarycUIkAKv0 9MpLwidXZXVaPrSN3MmyfXkwaOneDws9nzxA/y3Sa6HeZkG3WEkKWJLEtkJuY/wD NAmyhTsqLCUjN8A/EViIJPvTxLG0xYP5f2K1RQGkDaD8PFYiaHf/Asm/TFhR+Kw1 hAlzyAfnHIym6nXwK7kYaa8H3XSJs9Lmwg1TwEpp9dkygHlJqWu4JAsE9tB2t2gi +54GmcnIXnDWcEnKxRhptOMslQU5rlUNkC5a5TkoBtr5WkDIovYKG9dcfaQYPiq8 bfVVA2iCh6bPl8x3S2v+dqqvzn7I61nD9+++U+b1Cr2Ub7J6mCMZHaUFExTmPNUp dN8g2WW+r3EgGglYsgAufHoIKfnLE2WywoHvNa/KDYSIOJ3C0ofQYhqHB9ACp09d ChoCfL3psZFcIcekXaebsYv3bVBPO76pQ5HfFHJg5aWp9bnBnxJqY1o3RKN9ciq9 cDEDzXTByMeF84VArbfA =Oe/d -----END PGP SIGNATURE----- --gi9EaQhPmlxcVvXbCVPMt5LjrFhvHG9gM--