From unknown Sat Jun 21 17:34:07 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4597 <4597@debbugs.gnu.org> To: bug#4597 <4597@debbugs.gnu.org> Subject: Status: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified Reply-To: bug#4597 <4597@debbugs.gnu.org> Date: Sun, 22 Jun 2025 00:34:07 +0000 retitle 4597 Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always= set buffer modified reassign 4597 emacs submitter 4597 Roland.Meier@continental-corporation.com severity 4597 minor thanks From roland.meier@continental-corporation.com Wed Sep 30 03:01:22 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Sep 2009 10:01:22 +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.2 required=4.0 tests=AWL,HAS_BUG_NUMBER,MULTALT 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 n8UA1K7b014667 for ; Wed, 30 Sep 2009 03:01:22 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msvzs-0003nn-FV for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 06:01:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msvzn-0003fw-0S for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 06:01:18 -0400 Received: from [199.232.76.173] (port=59498 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msvzm-0003fl-NV for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 06:01:14 -0400 Received: from mailout02.rmx.de ([217.111.120.10]:47392) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msvzm-00030W-28 for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2009 06:01:14 -0400 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 Subject: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified 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_=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=_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 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 mange@freemail.hu Wed Sep 30 09:57:09 2009 Received: (at 4597) by emacsbugs.donarmstrong.com; 30 Sep 2009 16:57:11 +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.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from zimbra.erlangsystems.com (zimbra.erlangsystems.com [88.208.247.62]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8UGv7uS011286 for <4597@emacsbugs.donarmstrong.com>; Wed, 30 Sep 2009 09:57:09 -0700 Received: from linux-b2a3.site (unknown [192.168.42.57]) by zimbra.erlangsystems.com (Postfix) with ESMTP id F1869135A26E; Wed, 30 Sep 2009 17:57:00 +0100 (BST) From: Magnus Henoch To: Roland.Meier@continental-corporation.com Cc: 4597@debbugs.gnu.org Subject: Re: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified References: X-Hashcash: 1:25:090930:4597@emacsbugs.donarmstrong.com::T1DZDvKOrKZ+JPa7:000000000000000000000000000001aje9 X-Hashcash: 1:25:090930:roland.meier@continental-corporation.com::5Fx58ql3ejXAAHs6:000000000000000000001dGRK Date: Wed, 30 Sep 2009 17:56:57 +0100 In-Reply-To: (Roland Meier's message of "Wed, 30 Sep 2009 12:00:56 +0200") Message-ID: <847hvgpe06.fsf@linux-b2a3.site> 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 Roland.Meier@continental-corporation.com writes: > 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. Maybe M-x diff-buffer-with-file could do that for you? HTH, Magnus 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 debbugs-submit-bounces@debbugs.gnu.org Tue May 03 15:24:23 2022 Received: (at 4597) by debbugs.gnu.org; 3 May 2022 19:24:23 +0000 Received: from localhost ([127.0.0.1]:41101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nly8F-000489-5o 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 To: Roland.Meier@continental-corporation.com Subject: Re: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified 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-Debbugs-Envelope-To: 4597 Cc: 4587@debbugs.gnu.org, rm369@arcor.de, 4597@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: , 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 debbugs-submit-bounces@debbugs.gnu.org Wed May 04 03:21:06 2022 Received: (at 4597) by debbugs.gnu.org; 4 May 2022 07:21:06 +0000 Received: from localhost ([127.0.0.1]:41601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9Jq-00009W-1D 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 To: Lars Ingebrigtsen In-Reply-To: <874k26to6e.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 03 May 2022 21:24:09 +0200) Subject: Re: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified References: <874k26to6e.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 4597 Cc: 4587@debbugs.gnu.org, Roland.Meier@continental-corporation.com, 4597@debbugs.gnu.org, rm369@arcor.de 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 debbugs-submit-bounces@debbugs.gnu.org Wed May 04 03:53:36 2022 Received: (at 4597) by debbugs.gnu.org; 4 May 2022 07:53:36 +0000 Received: from localhost ([127.0.0.1]:41664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nm9pH-000105-TX 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 To: Eli Zaretskii Subject: Re: bug#4597: Antwort: Re: bug#4587: 23.1; sort-lines and sort-fields always set buffer modified 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-Debbugs-Envelope-To: 4597 Cc: 4587@debbugs.gnu.org, Roland.Meier@continental-corporation.com, 4597@debbugs.gnu.org, rm369@arcor.de 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 From unknown Sat Jun 21 17:34:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 Jun 2022 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator