From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: rm369@arcor.de, 4587@debbugs.gnu.org Resent-From: Roland.Meier@continental-corporation.com Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 29 Sep 2009 16:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125424295925097 (code B ref -1); Tue, 29 Sep 2009 16:50:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Sep 2009 16:49:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=FOURLA,MULTALT autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8TGnFWS025082 for ; Tue, 29 Sep 2009 09:49:18 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsfjH-0002Nv-Rj for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2009 12:39:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsfjD-0002IH-S7 for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2009 12:39:07 -0400 Received: from [199.232.76.173] (port=51618 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsfjD-0002HX-C0 for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2009 12:39:03 -0400 Received: from mailout01.rmx.de ([217.111.120.9]:39814) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsfjC-0005GU-72 for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2009 12:39:02 -0400 Received: from [172.19.21.67] (HELO crypto01.retarus.de) by mailout01.rmx.de (CommuniGate Pro SMTP 5.2.13 _community_) with ESMTPS id 54100287 for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2009 18:38:57 +0200 Received: (from daemon@localhost) by crypto01.retarus.de (8.13.6/8.13.6) id n8TGd2gU026390 for ; Tue, 29 Sep 2009 18:39:02 +0200 Received: from mailcc09.retarus.de (localhost [127.0.0.1]) by crypto01.retarus.de (8.13.6/8.13.6) with SMTP id n8TDK1HW024225 for ; Tue, 29 Sep 2009 18:39:02 +0200 Received: from sbas703a.cw01.contiwan.com ([158.92.186.29]) by frhb102.auto.contiwan.com (Lotus Domino Release 8.0.1) with ESMTP id 2009092918384652-334001 ; Tue, 29 Sep 2009 18:38:46 +0200 To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 X-KeepSent: 24152BC5:4B27E59E-C1257640:005A815D; type=4; flags=0; name=$KeepSent X-Mailer: Lotus Notes Release 6.5.6 March 06, 2007 Message-ID: From: Roland.Meier@continental-corporation.com Date: Tue, 29 Sep 2009 18:38:44 +0200 X-MIMETrack: S/MIME Sign by Notes Client on Roland Meier/usr/cag(Release 6.5.6|March 06, 2007) at 29.09.2009 18:38:44, Serialize by Notes Client on Roland Meier/usr/cag(Release 6.5.6|March 06, 2007) at 29.09.2009 18:38:44, Serialize complete at 29.09.2009 18:38:44, S/MIME Sign failed at 29.09.2009 18:38:44: Der Verschl?sselungsschl?ssel wurde nicht gefunden, Serialize by Router on vshb001/srvc7/srvc/cag(Release 8.5FP1|June 15, 2009) at 29.09.2009 18:38:48, Serialize complete at 29.09.2009 18:38:48, Itemize by SMTP Server on frhb102/srvcMX/srvc/cag(Release 8.0.1|February 07, 2008) at 09/29/2009 06:38:46 PM, Serialize by Router on frhb102/srvcMX/srvc/cag(Release 8.0.1|February 07, 2008) at 09/29/2009 06:38:49 PM, Serialize complete at 09/29/2009 06:38:49 PM X-TNEFEvaluated: 1 X-RMX-ID: 20090929-183850-n8TGcnM0019217-0@kdin02 X-RMX-TRACE: 2009-09-29 18:38:50 KdIn@kdin02/mailcc04 [0.4s] 20090929-183850-n8TGcnM0019217-0@kdin02 0:00:00 X-RMX-TRACE: 2009-09-29 18:38:51 RmxMSO@kdin02/mailcc11 [0.1s] 20090929-183850-n8TGcnM0019217-0@kdin02 0:00:01 Content-Type: multipart/alternative; boundary="=_alternative 005B7025C1257640_=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=_alternative 005B7025C1257640_= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" M-x sort-lines and M-x sort-fields always set the buffer modified status ("-" -> "*" in column 5 of the status line), even if the region was sorted and the command did not modify anything. An unmodified buffer should stay unmodified if nothing was changed. Reproduction: C-x C-f a a b c C-x C-s =20 M-x s o r t - l Status line should start with --\---, it starts with --\**- In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' Important settings: value of $LC=5FALL: nil value of $LC=5FCOLLATE: nil value of $LC=5FCTYPE: nil value of $LC=5FMESSAGES: nil value of $LC=5FMONETARY: nil value of $LC=5FNUMERIC: nil value of $LC=5FTIME: nil value of $LANG: DEU value of $XMODIFIERS: nil locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: show-paren-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-s C-s C-s C-a =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 C-s C-s C-a C-s C-s C-s C-s=20 C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a =20 =20 =20 =20 =20 =20 =20 =20 =20 M-. =20 =20 i e t p r =20 C-s s o r t C-s C-s C-a =20 C-s s o r t C-s C-s C-a =20 2 C-s C-s =20 C-s m o d i f C-s C-s C-s C-s C-a a=20 C-g a a b =20 c y e s c : \=20 a a b c =20 M-x s o r t - l C-=5F =20 M-x r e p o r Recent messages: Mark saved where search started Mark set Mark saved where search started [2 times] Quit (New file) [2 times] Saving file c:/a... Wrote c:/a Mark set [3 times] Undo! Making completion list... --=20 Mit freundlichen Gr=FC=DFen Roland Meier \|||/=20 (o o)=20 =3D=3DooO=3D=3DU=3D=3DOoo=3D=3D=20 mailto:rm369@arcor.de --=_alternative 005B7025C1257640_= Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="ISO-8859-1"
M-x sort-lines and M-x sort-fields a= lways set the buffer modified
status ("-" -> "*&= quot; in column 5 of the status line), even if the region
was sorted and the command did not m= odify anything.
An unmodified buffer should stay unm= odified if nothing was changed.
Reproduction:
C-x C-f a <return> a <retur= n> b <return> c <return> C-x C-s <C-home>
M-x s o r t - l <tab> <retu= rn>
Status line should start with --\---, it starts with --\**-


In GNU Emacs 23.1.1 (i386-mingw-nt5.= 1.2600)
 of 2009-07-30 on SOFT-MJASON
Windowing system distributor `Micros= oft Corp.', version 5.1.2600
configured using `configure --with-g= cc (4.4)'

Important settings:
  value of $LC=5FALL: nil
  value of $LC=5FCOLLATE: nil
  value of $LC=5FCTYPE: nil
  value of $LC=5FMESSAGES: nil<= /font>
  value of $LC=5FMONETARY: nil<= /font>
  value of $LC=5FNUMERIC: nil
  value of $LC=5FTIME: nil
  value of $LANG: DEU
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default-enable-multibyte-char= acters: t

Major mode: Fundamental

Minor modes in effect:
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-s C-s C-s C-a <up> <up> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-up>
<S-up> <S-up> <S-up&g= t; <S-up> <S-up> <S-up> <S-up> <S-up>
<S-up> <S-up> <S-up&g= t; <S-up> <S-up> <S-up> <S-up> <S-up>
<S-up> <S-up> <S-up&g= t; <S-up> <S-up> <S-down> <S-down>
<S-down> <S-down> <S-= down> <S-down> <S-down> <S-down>
<S-down> <S-down> <S-= delete> <S-up> <S-up> <S-up> <S-down>
<S-delete> <delete> C-s C-s C-a <f11> C-s C-s C-s C-s
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a <down>
<down> <down> <down&g= t; <down> <down> <down> <down> <down>
<down> <down> <down&g= t; <down> <down> <down> <down> <down>
<down> <down> <down&g= t; <down> <down> <down> <down> <down>
<down> <down> <down&g= t; <down> <down> <down> <down> <down>
<down> <down> <down&g= t; <down> <down> <down> <down> <up>
<up> <up> <up> <= ;up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <= ;up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <= ;up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <= ;up> <up> <up> <C-right> M-. <return>
<lwindow> <help-echo> &l= t;help-echo> <help-echo> <lwindow>
<f1> i <f2> <M-backsp= ace> e t <tab> p r <tab> <return>
<C-home> C-s s o r t C-s C-s C= -a <C-home> <lwindow>
<f3> <return> C-s s o r t C-s C-s C-a <C-home> <down>
<down> <down> <down&g= t; 2 C-s C-s <down> <up> <return>
C-s m o d i f C-s C-s C-s C-s C-a &l= t;lwindow> <f9> a
<tab> <return> C-g <f= 2> a <return> a <return> b <return>
c <return> <f3> <retu= rn> y e s <return> <f2> c : \
a <return> a <return> b <return> c <return> <f11> <C-S-home>
<C-end> M-x s o r t - l <ta= b> <return> C-=5F <lwindow>
M-x r e p o <tab> r <tab> <return>

Recent messages:
Mark saved where search started
Mark set
Mark saved where search started [2 t= imes]
Quit
(New file) [2 times]
Saving file c:/a...
Wrote c:/a
Mark set [3 times]
Undo!
Making completion list...

--
Mit freundlichen Gr=FC=DFen
Roland Meier

    \|||/
    (o o)
=3D=3DooO=3D=3DU=3D=3DOoo=3D=3D

mailto:rm369@arcor.de
--=_alternative 005B7025C1257640_=-- From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Stefan Monnier , 4587@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 30 Sep 2009 04:50:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12542858601191 (code B ref -1); Wed, 30 Sep 2009 04:50:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Sep 2009 04:44:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8U4iHI8001185 for ; Tue, 29 Sep 2009 21:44:18 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msr33-00033y-48 for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 00:44:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msr2w-00030V-Ok for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 00:44:15 -0400 Received: from [199.232.76.173] (port=49813 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msr2w-000307-GO for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 00:44:10 -0400 Received: from mx20.gnu.org ([199.232.41.8]:5173) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Msr2w-0005zn-2o for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 00:44:10 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msr2v-0003qr-DJ for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 00:44:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYEACt/wkrO+KOO/2dsb2JhbACBUNcBhB4Fh34 X-IronPort-AV: E=Sophos;i="4.44,478,1249272000"; d="scan'208";a="46829745" Received: from 206-248-163-142.dsl.teksavvy.com (HELO ceviche.home) ([206.248.163.142]) by ironport2-out.pppoe.ca with ESMTP; 30 Sep 2009 00:44:08 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 04A8DB4265; Wed, 30 Sep 2009 00:44:07 -0400 (EDT) From: Stefan Monnier To: rm369@arcor.de Cc: 4587@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: Date: Wed, 30 Sep 2009 00:44:07 -0400 In-Reply-To: (Roland Meier's message of "Tue, 29 Sep 2009 18:38:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 > M-x sort-lines and M-x sort-fields always set the buffer modified > status ("-" -> "*" in column 5 of the status line), even if the region > was sorted and the command did not modify anything. Indeed. The same holds true for fill-paragraph. > An unmodified buffer should stay unmodified if nothing was changed. > Reproduction: Yes, that's generally desirable. But in the above cases, given the way the code currently works, it's fairly inconvenient to do (the code does modify the buffer, it just so happens that the end text is the same as the original text), so it doesn't seem worth the trouble. Stefan From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Roland.Meier@continental-corporation.com, 4587@debbugs.gnu.org Resent-From: Roland.Meier@continental-corporation.com Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 30 Sep 2009 10:10:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4587-submit@emacsbugs.donarmstrong.com id=B4587.125430487914663 (code B ref 4587); Wed, 30 Sep 2009 10:10:09 +0000 Received: (at 4587) by emacsbugs.donarmstrong.com; 30 Sep 2009 10:01:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=AWL,HAS_BUG_NUMBER,MULTALT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout02.rmx.de (mailout02.rmx.de [217.111.120.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8UA1GHf014658 for <4587@emacsbugs.donarmstrong.com>; Wed, 30 Sep 2009 03:01:18 -0700 Received: from [172.19.21.68] (HELO crypto02.retarus.de) by mailout02.rmx.de (CommuniGate Pro SMTP 5.2.13 _community_) with ESMTPS id 54259972; Wed, 30 Sep 2009 12:01:10 +0200 Received: (from daemon@localhost) by crypto02.retarus.de (8.13.6/8.13.6) id n8UA1Ama016877; Wed, 30 Sep 2009 12:01:10 +0200 Received: from 10.64.74.160 (localhost [127.0.0.1]) by crypto02.retarus.de (8.13.6/8.13.6) with SMTP id n8U9ulhw014666; Wed, 30 Sep 2009 12:01:09 +0200 Received: from sbas703a.cw01.contiwan.com ([158.92.186.29]) by frhb102.auto.contiwan.com (Lotus Domino Release 8.0.1) with ESMTP id 2009093012010051-398154 ; Wed, 30 Sep 2009 12:01:00 +0200 In-Reply-To: To: monnier@iro.umontreal.ca Cc: 4587@debbugs.gnu.org, bug-gnu-emacs@gnu.org MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.6 March 06, 2007 Message-ID: From: Roland.Meier@continental-corporation.com Date: Wed, 30 Sep 2009 12:00:56 +0200 X-MIMETrack: S/MIME Sign by Notes Client on Roland Meier/usr/cag(Release 6.5.6|March 06, 2007) at 30.09.2009 12:00:56, Serialize by Notes Client on Roland Meier/usr/cag(Release 6.5.6|March 06, 2007) at 30.09.2009 12:00:56, Serialize complete at 30.09.2009 12:00:56, S/MIME Sign failed at 30.09.2009 12:00:56: Der Verschl?sselungsschl?ssel wurde nicht gefunden, Serialize by Router on vshb001/srvc7/srvc/cag(Release 8.5FP1|June 15, 2009) at 30.09.2009 12:01:02, Serialize complete at 30.09.2009 12:01:02, Itemize by SMTP Server on frhb102/srvcMX/srvc/cag(Release 8.0.1|February 07, 2008) at 09/30/2009 12:01:00 PM, Serialize by Router on frhb102/srvcMX/srvc/cag(Release 8.0.1|February 07, 2008) at 09/30/2009 12:01:02 PM, Serialize complete at 09/30/2009 12:01:02 PM X-TNEFEvaluated: 1 X-RMX-ID: 20090930-120103-n8UA12Eg012545-0@kdin65 X-RMX-TRACE: 2009-09-30 12:01:03 KdIn@kdin65/mailcc66 [0.5s] 20090930-120103-n8UA12Eg012545-0@kdin65 0:00:00 X-RMX-TRACE: 2009-09-30 12:01:04 RmxMSO@kdin65/mailcc67 [0.1s] 20090930-120103-n8UA12Eg012545-0@kdin65 0:00:01 Content-Type: multipart/alternative; boundary="=_alternative 003704BFC1257641_=" --=_alternative 003704BFC1257641_= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" > Yes, that's generally desirable. But in the above cases, given the way > the code currently works, it's fairly inconvenient to do (the code does > modify the buffer, it just so happens that the end text is the same as > the original text), so it doesn't seem worth the trouble. Wouldn't it be possible in case of an unmodified buffer to copy the=20 content of the region at the beginning to a temporary buffer, compare it=20 to the result afterwards, and if they match to restore the unmodified=20 status? I sometimes need to check a list (which isn't small enough to be checked=20 at a glance) after editing it if it is still sorted. Now I write he region before and after sorting it to separate files and=20 compare them, but I wonder if a powerful tool like emacs must keep such an = obvious annoyance like this... Thanks! --=20 Mit freundlichen Gr=FC=DFen Roland Meier \|||/=20 (o o)=20 =3D=3DooO=3D=3DU=3D=3DOoo=3D=3D=20 --=_alternative 003704BFC1257641_= Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="ISO-8859-1"
> Yes, that's generally desirable.  But in the above cases, given the way
> the code currently works, it's fairly inconvenient to do (the code does
> modify the buffer, it just so happens that the end text is the same as
> the original text), so it doesn't seem worth the trouble.

Wouldn't it be possible in case of an unmodified buffer to copy the content of the region at the beginning to a temporary buffer, compare it to the result afterwards, and if they match to restore the unmodified status?

I sometimes need to check a list (wh= ich isn't small enough to be checked at a glance) after editing it if it is still sorted.
Now I write he region before and aft= er sorting it to separate files and compare them, but I wonder if a powerful tool like emacs must keep such an obvious annoyance like this...

Thanks!
--
Mit freundlichen Gr=FC=DFen
Roland Meier

    \|||/
    (o o)
=3D=3DooO=3D=3DU=3D=3DOoo=3D=3D

--=_alternative 003704BFC1257641_=-- From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Stefan Monnier , 4587@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 30 Sep 2009 14:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4587-submit@emacsbugs.donarmstrong.com id=B4587.125431872115712 (code B ref 4587); Wed, 30 Sep 2009 14:00:05 +0000 Received: (at 4587) by emacsbugs.donarmstrong.com; 30 Sep 2009 13:52:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8UDpxYM015573 for <4587@emacsbugs.donarmstrong.com>; Wed, 30 Sep 2009 06:52:00 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAOf+wkrO+KOO/2dsb2JhbACBUddFhCcEhw8 X-IronPort-AV: E=Sophos;i="4.44,480,1249272000"; d="scan'208";a="46840175" Received: from 206-248-163-142.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.142]) by ironport2-out.pppoe.ca with ESMTP; 30 Sep 2009 09:51:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id D6F868109; Wed, 30 Sep 2009 09:51:50 -0400 (EDT) From: Stefan Monnier To: Roland.Meier@continental-corporation.com Cc: 4587@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: Date: Wed, 30 Sep 2009 09:51:50 -0400 In-Reply-To: (Roland Meier's message of "Wed, 30 Sep 2009 12:00:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Yes, that's generally desirable. But in the above cases, given the way >> the code currently works, it's fairly inconvenient to do (the code does >> modify the buffer, it just so happens that the end text is the same as >> the original text), so it doesn't seem worth the trouble. > Wouldn't it be possible in case of an unmodified buffer to copy the > content of the region at the beginning to a temporary buffer, compare it > to the result afterwards, and if they match to restore the unmodified > status? I'd indeed expect that to implement the feature you request, the code would have to do something like that. Most likely not copying the text itself, but instead storing an md5 or somesuch hash of the text. > I sometimes need to check a list (which isn't small enough to be checked > at a glance) after editing it if it is still sorted. > Now I write he region before and after sorting it to separate files and > compare them, but I wonder if a powerful tool like Emacs must keep such an > obvious annoyance like this... No, it definitely doesn't have to keep such obvious annoyances. But it's not very high on the priority list. Stefan From rgm@gnu.org Wed Sep 30 09:20:12 2009 Received: (at control) by emacsbugs.donarmstrong.com; 30 Sep 2009 16:20:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8UGKB5b005179 for ; Wed, 30 Sep 2009 09:20:12 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mt1uS-0004W5-Ut; Wed, 30 Sep 2009 12:20:09 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19139.34104.692802.416744@fencepost.gnu.org> Date: Wed, 30 Sep 2009 12:20:08 -0400 From: Glenn Morris To: control Subject: control severity 4583 minor severity 4587 minor reassign 4582 emacs,aix merge 4587 4597 4601 severity 4594 wishlist reassign 4598 spam reassign 4600 spam reassign 4602 spam reassign 4603 spam From rgm@gnu.org Wed Sep 30 09:28:53 2009 Received: (at control) by emacsbugs.donarmstrong.com; 30 Sep 2009 16:28:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,ONEWORD,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8UGSqSI007020 for ; Wed, 30 Sep 2009 09:28:53 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mt22u-0003BU-4g; Wed, 30 Sep 2009 12:28:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19139.34628.87517.252885@fencepost.gnu.org> Date: Wed, 30 Sep 2009 12:28:52 -0400 From: Glenn Morris To: control Subject: control X-Debbugs-No-Ack: yes forcemerge 4587 4597 4601 From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Kevin Rodgers , 4587@debbugs.gnu.org Resent-From: Kevin Rodgers Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 01 Oct 2009 12:35:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125440021823184 (code B ref -1); Thu, 01 Oct 2009 12:35:08 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Oct 2009 12:30:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n91CUGE0023163 for ; Thu, 1 Oct 2009 05:30:17 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtKnX-0003yK-RN for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 08:30:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtKnT-0003so-6X for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 08:30:15 -0400 Received: from [199.232.76.173] (port=57786 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtKnS-0003sR-P7 for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 08:30:10 -0400 Received: from lo.gmane.org ([80.91.229.12]:53216) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtKnS-0003B7-0Z for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 08:30:10 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1MtKnL-0008Dw-RE for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 14:30:03 +0200 Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Oct 2009 14:30:03 +0200 Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Oct 2009 14:30:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Date: Thu, 01 Oct 2009 06:25:59 -0600 Lines: 39 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Stefan Monnier wrote: >>> Yes, that's generally desirable. But in the above cases, given the way >>> the code currently works, it's fairly inconvenient to do (the code does >>> modify the buffer, it just so happens that the end text is the same as >>> the original text), so it doesn't seem worth the trouble. > >> Wouldn't it be possible in case of an unmodified buffer to copy the >> content of the region at the beginning to a temporary buffer, compare it >> to the result afterwards, and if they match to restore the unmodified >> status? > > I'd indeed expect that to implement the feature you request, the code > would have to do something like that. Most likely not copying the text > itself, but instead storing an md5 or somesuch hash of the text. Not suitable for Emacs, but maybe useful for Roland: (defadvice sort-lines (around restore-buffer-modified-p activate) (let* ((buffer-was-modified-p (buffer-modified-p)) (buffer-was-not-modified-md5 (if (not buffer-was-modified-p) (md5 (current-buffer))))) ad-do-it (when (and (not buffer-was-modified-p) (buffer-modified-p) (not (equal buffer-was-not-modified-md5 (md5 (current-buffer))))) (restore-buffer-modified-p buffer-was-modified-p)))) >> I sometimes need to check a list (which isn't small enough to be checked >> at a glance) after editing it if it is still sorted. >> Now I write he region before and after sorting it to separate files and >> compare them, but I wonder if a powerful tool like Emacs must keep such an >> obvious annoyance like this... > > No, it definitely doesn't have to keep such obvious annoyances. > But it's not very high on the priority list. -- Kevin Rodgers Denver, Colorado, USA From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Stefan Monnier , 4587@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 01 Oct 2009 14:25:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12544067816841 (code B ref -1); Thu, 01 Oct 2009 14:25:06 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Oct 2009 14:19:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n91EJdu8006832 for ; Thu, 1 Oct 2009 07:19:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtMVO-0002LP-NQ for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 10:19:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtMVK-0002JX-QZ for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 10:19:38 -0400 Received: from [199.232.76.173] (port=39918 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtMVK-0002JP-Ix for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 10:19:34 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:9995 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtMVK-0001xt-2o for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2009 10:19:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHlXxEpMCrXH/2dsb2JhbACBUdVLhCkEhxo X-IronPort-AV: E=Sophos;i="4.44,487,1249272000"; d="scan'208";a="46900671" Received: from 76-10-181-199.dsl.teksavvy.com (HELO ceviche.home) ([76.10.181.199]) by ironport2-out.pppoe.ca with ESMTP; 01 Oct 2009 10:19:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2535CB4265; Thu, 1 Oct 2009 10:19:32 -0400 (EDT) From: Stefan Monnier To: Kevin Rodgers Cc: 4587@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: Date: Thu, 01 Oct 2009 10:19:32 -0400 In-Reply-To: (Kevin Rodgers's message of "Thu, 01 Oct 2009 06:25:59 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 >> I'd indeed expect that to implement the feature you request, the code >> would have to do something like that. Most likely not copying the text >> itself, but instead storing an md5 or somesuch hash of the text. > Not suitable for Emacs, but maybe useful for Roland: > (defadvice sort-lines (around restore-buffer-modified-p activate) > (let* ((buffer-was-modified-p (buffer-modified-p)) > (buffer-was-not-modified-md5 (if (not buffer-was-modified-p) > (md5 (current-buffer))))) > ad-do-it > (when (and (not buffer-was-modified-p) > (buffer-modified-p) > (not (equal buffer-was-not-modified-md5 (md5 (current-buffer))))) > (restore-buffer-modified-p buffer-was-modified-p)))) Maybe we could make it suitable, turn it into a macro and use it around the various candidates. AFAICT, here are the problems I see with it: - the call to md5 should use as much as possible the internal encoding. I.e. at least pass an `emacs-internal' arg, tho it would be even better to let md5 work directly on the internal representation. - it should only work on the afected region rather than the whole buffer (i.e. it needs start..end arguments). - should it fiddle with the undo list? or even revert the whole "without-effect" set of changes (the changes may result in the same final text, but they may very well have moved markers and changed text-properties, and it might be desirable to undo those changes, so as to better pretend nothing happened). -- Stefan From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Kevin Rodgers , 4587@debbugs.gnu.org Resent-From: Kevin Rodgers Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 25 Oct 2009 13:50:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12564781391298 (code B ref -1); Sun, 25 Oct 2009 13:50:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Oct 2009 13:42:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9PDgGX9001293 for ; Sun, 25 Oct 2009 06:42:19 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N23MO-0000Ve-8P for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 09:42:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N23MJ-0000Uc-QK for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 09:42:15 -0400 Received: from [199.232.76.173] (port=48499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N23MJ-0000UZ-K1 for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 09:42:11 -0400 Received: from lo.gmane.org ([80.91.229.12]:40585) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N23MJ-0005Nb-6u for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 09:42:11 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N23MG-0003Jl-Kr for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 14:42:08 +0100 Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 14:42:08 +0100 Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 14:42:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Date: Sun, 25 Oct 2009 07:41:47 -0600 Lines: 59 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Stefan Monnier wrote: >>> I'd indeed expect that to implement the feature you request, the code >>> would have to do something like that. Most likely not copying the text >>> itself, but instead storing an md5 or somesuch hash of the text. > >> Not suitable for Emacs, but maybe useful for Roland: > >> (defadvice sort-lines (around restore-buffer-modified-p activate) >> (let* ((buffer-was-modified-p (buffer-modified-p)) >> (buffer-was-not-modified-md5 (if (not buffer-was-modified-p) >> (md5 (current-buffer))))) >> ad-do-it >> (when (and (not buffer-was-modified-p) >> (buffer-modified-p) >> (not (equal buffer-was-not-modified-md5 (md5 (current-buffer))))) >> (restore-buffer-modified-p buffer-was-modified-p)))) > > Maybe we could make it suitable, turn it into a macro and use it around > the various candidates. AFAICT, here are the problems I see with it: > - the call to md5 should use as much as possible the internal encoding. > I.e. at least pass an `emacs-internal' arg, tho it would be even > better to let md5 work directly on the internal representation. > - it should only work on the afected region rather than the whole buffer > (i.e. it needs start..end arguments). > - should it fiddle with the undo list? or even revert the whole > "without-effect" set of changes (the changes may result in the same > final text, but they may very well have moved markers and changed > text-properties, and it might be desirable to undo those changes, so > as to better pretend nothing happened). Is this what you have in mind? (defmacro with-maybe-region-modified (beg end &rest body) "Execute BODY, then `restore-buffer-modified-p' if the contents are unchanged. BODY should not change the current buffer or modify the contents outside the region between BEG and END." `(let* ((region-beg ,beg) (region-end ,end) (buffer-was-modified-p (buffer-modified-p)) (buffer-was-not-modified-md5 (if (not buffer-was-modified-p) (md5 (current-buffer) region-beg region-end 'emacs-mule))) ;; (orig-buffer-undo-list buffer-undo-list) (with-maybe-region-modified-result (progn ,@body))) ; save-current-buffer? (when (and (not buffer-was-modified-p) (buffer-modified-p) (not (equal buffer-was-not-modified-md5 (md5 (current-buffer) region-beg region-end 'emacs-mule)))) (restore-buffer-modified-p buffer-was-modified-p) ;; (setq buffer-undo-list orig-buffer-undo-list) ) with-maybe-region-modified-result)) -- Kevin Rodgers Denver, Colorado, USA From unknown Sat Aug 16 19:14:48 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4587: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: Stefan Monnier , 4587@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 25 Oct 2009 15:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4587 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125648445120160 (code B ref -1); Sun, 25 Oct 2009 15:35:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Oct 2009 15:27:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9PFRT8U020153 for ; Sun, 25 Oct 2009 08:27:30 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N250C-0007ly-Pr for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 11:27:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2507-0007jj-IG for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 11:27:28 -0400 Received: from [199.232.76.173] (port=45325 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2507-0007jd-9k for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 11:27:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:27247 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2506-00039l-Vx for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2009 11:27:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkEAF8L5EpLd/xb/2dsb2JhbACBT9JuhD8EiDQ X-IronPort-AV: E=Sophos;i="4.44,621,1249272000"; d="scan'208";a="48131225" Received: from 75-119-252-91.dsl.teksavvy.com (HELO pastel.home) ([75.119.252.91]) by ironport2-out.pppoe.ca with ESMTP; 25 Oct 2009 11:27:22 -0400 Received: by pastel.home (Postfix, from userid 20848) id D0D468225; Sun, 25 Oct 2009 11:27:21 -0400 (EDT) From: Stefan Monnier To: Kevin Rodgers Cc: 4587@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: Date: Sun, 25 Oct 2009 11:27:21 -0400 In-Reply-To: (Kevin Rodgers's message of "Sun, 25 Oct 2009 07:41:47 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 >> Maybe we could make it suitable, turn it into a macro and use it around >> the various candidates. AFAICT, here are the problems I see with it: >> - the call to md5 should use as much as possible the internal encoding. >> I.e. at least pass an `emacs-internal' arg, tho it would be even >> better to let md5 work directly on the internal representation. >> - it should only work on the afected region rather than the whole buffer >> (i.e. it needs start..end arguments). >> - should it fiddle with the undo list? or even revert the whole >> "without-effect" set of changes (the changes may result in the same >> final text, but they may very well have moved markers and changed >> text-properties, and it might be desirable to undo those changes, so >> as to better pretend nothing happened). > Is this what you have in mind? That looks almost right. Here are some nitpicks: > (defmacro with-maybe-region-modified (beg end &rest body) > "Execute BODY, then `restore-buffer-modified-p' if the contents are unchanged. > BODY should not change the current buffer or modify the contents outside the region > between BEG and END." The docstring is wider then our convention. > `(let* ((region-beg ,beg) > (region-end ,end) > (buffer-was-modified-p (buffer-modified-p)) > (buffer-was-not-modified-md5 (if (not buffer-was-modified-p) > (md5 (current-buffer) region-beg region-end > 'emacs-mule))) Use `emacs-internal' here (in Emacs-23, the internal encoding is not emacs-mule any more). Don't use hardcoded symbols, since `body' might actually refer to identically-named variables. Add a FIXME-comment indicating that md5 should be improved to compute this result without actually performing the encoding. Or better yet, provide a patch to `md5' which does just that. > ;; (orig-buffer-undo-list buffer-undo-list) > (with-maybe-region-modified-result > (progn ,@body))) ; save-current-buffer? Yes, save-current-buffer seems to be necessary here, otherwise the code will misbehave. > (when (and (not buffer-was-modified-p) > (buffer-modified-p) > (not (equal buffer-was-not-modified-md5 > (md5 (current-buffer) region-beg region-end > 'emacs-mule)))) > (restore-buffer-modified-p buffer-was-modified-p) > ;; (setq buffer-undo-list orig-buffer-undo-list) > ) > with-maybe-region-modified-result)) I think region-end should be assisted by a marker so we can detect if the size of the region has changed and skip the second md5 call in that case. More importantly, I think the "(not (equal ...))" should be "(equal ...)". Also, please add a FIXME-comment about whether we should maybe use `undo' to revert the "effectless" changes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 14:05:45 2010 Received: (at control) by debbugs.gnu.org; 27 Jan 2010 19:05:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaDCy-0006Ap-AP for submit@debbugs.gnu.org; Wed, 27 Jan 2010 14:05:44 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaDCx-0006Aj-7h for control@debbugs.gnu.org; Wed, 27 Jan 2010 14:05:43 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NaDCs-0001gk-Um; Wed, 27 Jan 2010 14:05:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19296.36482.889220.134963@fencepost.gnu.org> Date: Wed, 27 Jan 2010 14:05:38 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: F(.|-B,H:R~xl8p)'Eg_`)\`pK* X-Debbugs-No-Ack: yes X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) severity 4516 wishlist severity 4517 minor tags 4583 wontfix unmerge 4601 tags 4594 wontfix From unknown Sat Aug 16 19:14:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4587: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2022 19:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Roland.Meier@continental-corporation.com Cc: 4587@debbugs.gnu.org, rm369@arcor.de, 4597@debbugs.gnu.org Received: via spool by 4587-submit@debbugs.gnu.org id=B4587.165160586315884 (code B ref 4587); Tue, 03 May 2022 19:25:02 +0000 Received: (at 4587) by debbugs.gnu.org; 3 May 2022 19:24:23 +0000 Received: from localhost ([127.0.0.1]:41099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nly8E-000486-Vc for submit@debbugs.gnu.org; Tue, 03 May 2022 15:24:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nly8C-00047l-Eq; Tue, 03 May 2022 15:24:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zif5s31rnXUwm0SMCcLPoM3oPxsarsad2QmEikw2Cmo=; b=e0ddx+HxEjlfy8DTesLnq0U2Dc 0E4JKAwd4Lff/MThc1w3wCQr5f6RgCLgV4NTmOVRhmjGjqJB9/iELaDl7qc2jDtblLFFTVmK9evFn eEiMSfi4p9DfsIECBGDbnVzHCzGGA6y/8zLIkiYW826dtugo6WslILrjzXMJk+Qc/IBQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nly83-0001Oq-0f; Tue, 03 May 2022 21:24:13 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Joni Mitchell's _Wild Things Run Fast_: "(You're So Square) Baby, I Don't Care" Date: Tue, 03 May 2022 21:24:09 +0200 In-Reply-To: (Roland Meier's message of "Tue, 29 Sep 2009 18:38:44 +0200") Message-ID: <874k26to6e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Roland.Meier@continental-corporation.com writes: > M-x sort-lines and M-x sort-fields always set the buffer modified > status ("-" -> "*" in column 5 of the status line), even if the region > was sorted and the command did not modify anything. > An [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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.3 (---) Roland.Meier@continental-corporation.com writes: > M-x sort-lines and M-x sort-fields always set the buffer modified > status ("-" -> "*" in column 5 of the status line), even if the region > was sorted and the command did not modify anything. > An unmodified buffer should stay unmodified if nothing was changed. (I'm going through old bug reports that unfortunately weren't resolved at the time.) I've now fixed this in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue May 03 15:24:28 2022 Received: (at control) by debbugs.gnu.org; 3 May 2022 19:24:28 +0000 Received: from localhost ([127.0.0.1]:41104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nly8K-00048V-F3 for submit@debbugs.gnu.org; Tue, 03 May 2022 15:24:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nly8I-000484-OT for control@debbugs.gnu.org; Tue, 03 May 2022 15:24:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0emV/eiM0donkBf8E+SjhKEmBckHMEg9vLg0lKlzWEA=; b=UWPPw6eeQYvVGab2lwiAmVmYeO eKac2OO0ZK8bzcc64wXCAnxRt++iRUJV4gzdKLwP1feco8iKVGHv8/IL2uJWpXUmNRVx/+SRBFe/A +MBaIXf0jaB4f9ehMvJRwba7dPhrVfC6Y2CuBAg1jI4r80Pk5urhxyMo/9UGVTSqX5LA=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nly8B-0001Ow-22 for control@debbugs.gnu.org; Tue, 03 May 2022 21:24:20 +0200 Date: Tue, 03 May 2022 21:24:18 +0200 Message-Id: <8735hqto65.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4597 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 4597 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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.3 (---) close 4597 29.1 quit From unknown Sat Aug 16 19:14:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4587: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 May 2022 07:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 4587@debbugs.gnu.org, Roland.Meier@continental-corporation.com, 4597@debbugs.gnu.org, rm369@arcor.de Received: via spool by 4587-submit@debbugs.gnu.org id=B4587.1651648866603 (code B ref 4587); Wed, 04 May 2022 07:22:01 +0000 Received: (at 4587) by debbugs.gnu.org; 4 May 2022 07:21:06 +0000 Received: from localhost ([127.0.0.1]:41603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9Jq-00009Z-AA for submit@debbugs.gnu.org; Wed, 04 May 2022 03:21:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9Jo-00008U-1c; Wed, 04 May 2022 03:21:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nm9Jh-0003JX-IV; Wed, 04 May 2022 03:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zgPPfi6VeTk1sqDuS5I3pLHxgMfs3yhYxEpWTuTPJtw=; b=VpsYisoYx5Ig J26UR5LRiJ2N+WBw+C0+8l8ZO+Jzbs6F9e6dFNseVZKTmWxk19WExGGBw1zDaTGtWM6nxZAVPuUbO sjBA8Ll/5Qpz6VDYjI1i5W9QpWr3Sfe53APrSPZzRGfRwfZOrwFF/5yHtM//wF59IrtRGBcXtxSEs rD8eTOgOkfD2KNnkeatFhQNlnkFBTQus4gk9gkxctKSIhEuscXj80fejr4Qao3BSkeDJBkqMOEEP1 FR5c4rHN0kUCoTJPsEmF0bOM+w1If5jPjPo5GeeHWag+nsyTLdcknL0Vd9IAOwphmx0q4e1TGTMi8 3TErhDLQ52PeWC5+s7ajug==; Received: from [87.69.77.57] (port=3994 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nm9Jf-0007Ky-QN; Wed, 04 May 2022 03:20:56 -0400 Date: Wed, 04 May 2022 10:21:08 +0300 Message-Id: <837d714vbv.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874k26to6e.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 03 May 2022 21:24:09 +0200) References: <874k26to6e.fsf@gnus.org> X-Spam-Score: -2.3 (--) 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.3 (---) > Resent-From: Lars Ingebrigtsen > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > Cc: 4587@debbugs.gnu.org, rm369@arcor.de, 4597@debbugs.gnu.org > From: Lars Ingebrigtsen > Date: Tue, 03 May 2022 21:24:09 +0200 > > Roland.Meier@continental-corporation.com writes: > > > M-x sort-lines and M-x sort-fields always set the buffer modified > > status ("-" -> "*" in column 5 of the status line), even if the region > > was sorted and the command did not modify anything. > > An unmodified buffer should stay unmodified if nothing was changed. > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > I've now fixed this in Emacs 29. This uses buffer-hash, which is only sensitive to changes in the byte sequences of the buffer text. AFAIU, it doesn't know about other possible changes we perceive as "buffer changes", like changes in faces, overlays, buffer-file-coding-system, etc. Shouldn't this be prominently documented in the macro's doc string? From unknown Sat Aug 16 19:14:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4587: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 May 2022 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 4587@debbugs.gnu.org, Roland.Meier@continental-corporation.com, 4597@debbugs.gnu.org, rm369@arcor.de Received: via spool by 4587-submit@debbugs.gnu.org id=B4587.16516508163860 (code B ref 4587); Wed, 04 May 2022 07:54:02 +0000 Received: (at 4587) by debbugs.gnu.org; 4 May 2022 07:53:36 +0000 Received: from localhost ([127.0.0.1]:41666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9pI-000107-3v for submit@debbugs.gnu.org; Wed, 04 May 2022 03:53:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9pG-0000zp-5k; Wed, 04 May 2022 03:53:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RvPPO3B0r4AW7oNp5yXTcO2piQQer62dpbAe8ldCZJk=; b=XS5RUOthfjbL4Z2PPOO+onriNi WI/83AxzRcfPM+YJObvqE8LOG1NuwtKXoV0NbUEnIMv+BUE2rntJp3++guxymVkF/3LqjDRrj9pcH egJeys4pCgKGjJQsAtiARZVJ/acFizo/7mzD4/NI87ltKseJZc+HoUdmSs3NyptMGSLc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nm9p7-0008Mb-9L; Wed, 04 May 2022 09:53:27 +0200 From: Lars Ingebrigtsen References: <874k26to6e.fsf@gnus.org> <837d714vbv.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVpQUqNbGehgnmr j4ykPFb////1tcpiAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YFBAcqAs9h8ZkAAAG7SURBVDjLbZOL ecMwCIRR3QEALRChBWqpA3T/qXqAZLsPJfmS6AcdcDIVMR0qWNbnnPgMfM1BImpTzcbwvT7Ooh4w AUSbrNX6/KBjZbBIYbzxEul9gdMzpID6NnTmC6BDhoo81xwAY5j0J1CIGdNh0Bz0jFdEAgwzMSp3 TYirlekN5Zr91FDFUepdyi/QAQT7dT41mjRtjMMtRxL17xRhP6P1884gX4Vpr62RO4XeP/8Fwsf8 BST/MH09AKKvgl38zrhARbmKdhoahBkO/AWwq3Yg7pUQpyPeuSmmGxqPubxI+2kiS9xtDIrpljrQ u5ee8WVnvCmcGlkPRRqnxqFznKjHEzwNzbg+jKowquUc4k1xlXzsZwBXxikZ7gBN9BBfwIsoPhLV NYwYTl65EhmzntH5AviB+2I+UAD13Q2Yo9x3H9XapYJxHlwWwLVwgLO8TZLXNR65AIJJWgmjbsCF 1r0ygVHpCfljsw30JycaXBm3szH2uH2a4GEUMmpbR+l2sIV4lXOBq8TMqG3kUZRGXfequsgfYFdV YTm5r9nO3aADTlOdAPgDEpWGc1sjnUvA9+VJwNn5I/4xxG+tY0pqahonDQAAACV0RVh0ZGF0ZTpj cmVhdGUAMjAyMi0wNS0wNFQwNzo0MjowMiswMDowMJa32oEAAAAldEVYdGRhdGU6bW9kaWZ5ADIw MjItMDUtMDRUMDc6NDI6MDIrMDA6MDDn6mI9AAAAAElFTkSuQmCC X-Now-Playing: Simple Minds's _New Gold Dream (81-82-83-84)_: "Promised You a Miracle" Date: Wed, 04 May 2022 09:53:24 +0200 In-Reply-To: <837d714vbv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 May 2022 10:21:08 +0300") Message-ID: <87pmktvimj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > This uses buffer-hash, which is only sensitive to changes in the byte > sequences of the buffer text. AFAIU, it doesn't know about other > possible changes we perceive as "buffer changes", like chan [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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.3 (---) Eli Zaretskii writes: > This uses buffer-hash, which is only sensitive to changes in the byte > sequences of the buffer text. AFAIU, it doesn't know about other > possible changes we perceive as "buffer changes", like changes in > faces, overlays, buffer-file-coding-system, etc. Shouldn't this be > prominently documented in the macro's doc string? (Adding overlays doesn't change modification status.) If you think that needs to be spelled out, please go ahead, but it doesn't seem necessary to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no