From unknown Mon Jun 23 07:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19029: Cut down on useless "really edit the buffer?" prompts Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Nov 2014 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19029@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141580311526869 (code B ref -1); Wed, 12 Nov 2014 14:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Nov 2014 14:38:35 +0000 Received: from localhost ([127.0.0.1]:58313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XoZ47-0006zH-30 for submit@debbugs.gnu.org; Wed, 12 Nov 2014 09:38:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XoZ43-0006z8-95 for submit@debbugs.gnu.org; Wed, 12 Nov 2014 09:38:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoZ41-0002eJ-JL for submit@debbugs.gnu.org; Wed, 12 Nov 2014 09:38:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ41-0002e9-GU for submit@debbugs.gnu.org; Wed, 12 Nov 2014 09:38:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ3x-0002ie-LP for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:38:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoZ3w-0002dF-N9 for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:38:25 -0500 Received: from mail-ig0-x22f.google.com ([2607:f8b0:4001:c05::22f]:52917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ3w-0002d6-Hd for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:38:24 -0500 Received: by mail-ig0-f175.google.com with SMTP id h3so3036034igd.14 for ; Wed, 12 Nov 2014 06:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ao6FWZL+ykixbbTU9m5Cm4E6ImEkZrg+sKVr6zsVB4c=; b=OrcqXn9ytt7/oji0bw7fsffEfSo8vcm0gLt0ZHVcSCgiPv7wP1m3t9H7Qc3pF4861V 0xhJ/Phc2xfvgr3VRG3dtsAL4WuNpeQkyUY6Uu0EX0Hd4daaYvEoVewHBur6Llnjqmpq tUooOsQpyGw+cf1XxhXWbT14iMKjyJtu1pAW0vRdevZmtfUge9zN9BwKgC8W0HEceCUs bCjtrkUphWSMB8BMJaaQLQgeZ7XdqwQ+bqO5PE5Xcj9TbniN0fXGdbZQeVGmIx7KppxR FGIPqnqclhulfv7QANJ57z9bDjnz1QlU2Jtt+J+bxh1ljlwEguksLVWb7o8m2K7725Pp flrQ== MIME-Version: 1.0 X-Received: by 10.107.131.85 with SMTP id f82mr48794102iod.31.1415803103657; Wed, 12 Nov 2014 06:38:23 -0800 (PST) Received: by 10.43.2.132 with HTTP; Wed, 12 Nov 2014 06:38:23 -0800 (PST) Date: Wed, 12 Nov 2014 15:38:23 +0100 Message-ID: From: Paul Pogonyshev Content-Type: multipart/alternative; boundary=001a113ec8d810c6cc0507aa59e7 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a113ec8d810c6cc0507aa59e7 Content-Type: text/plain; charset=UTF-8 When switching between different branches in a VCS system, file modification date may change even though its contents isn't. For example, when switching from trunk to a branch X where the file is modified, then switching back. As a result, if the file was opened in Emacs before the switches, and I attempt to edit it afterwards, Emacs prompts me with "... changed on disk; really edit the buffer?" even though the only thing that "changed" about it is the modification time. (To make it worse, Emacs requires _three_ confirmation to edit and save...) Request: if Emacs detects timestamp change, let it read the file and compare it with the buffer; if they are byte-to-byte identical, just ignore the timestamp. To reproduce: open any existing file, say 'x.txt'. Now type: M-! touch x.txt and try to edit the buffer. Paul --001a113ec8d810c6cc0507aa59e7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When switching between different branches in a V= CS system, file modification date may change even though its contents isn&#= 39;t. For example, when switching from trunk to a branch X where the file i= s modified, then switching back.

As a result, if the file was opened= in Emacs before the switches, and I attempt to edit it afterwards, Emacs p= rompts me with "... changed on disk; really edit the buffer?" eve= n though the only thing that "changed" about it is the modificati= on time. (To make it worse, Emacs requires _three_ confirmation to edit and= save...)

Request: if Emacs detects timestamp change, let it r= ead the file and compare it with the buffer; if they are byte-to-byte ident= ical, just ignore the timestamp.

To reproduce: open any e= xisting file, say 'x.txt'. Now type:

=C2=A0=C2=A0= =C2=A0 M-! touch x.txt

and try to edit the buffer.
Paul
--001a113ec8d810c6cc0507aa59e7-- From unknown Mon Jun 23 07:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19029: Cut down on useless "really edit the buffer?" prompts Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2017 22:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Pogonyshev Cc: 19029@debbugs.gnu.org Received: via spool by 19029-submit@debbugs.gnu.org id=B19029.149047950614523 (code B ref 19029); Sat, 25 Mar 2017 22:06:01 +0000 Received: (at 19029) by debbugs.gnu.org; 25 Mar 2017 22:05:06 +0000 Received: from localhost ([127.0.0.1]:44742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crto2-0003m5-23 for submit@debbugs.gnu.org; Sat, 25 Mar 2017 18:05:06 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:36447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crto0-0003lU-Hc; Sat, 25 Mar 2017 18:05:04 -0400 Received: by mail-it0-f65.google.com with SMTP id 190so4620148itm.3; Sat, 25 Mar 2017 15:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lcAex2iXgDPG5RtO5lyx8Pz9uPIF50Vh3qu+rIRHU/w=; b=RooKOKaJ4GTPbrX4KlF2GYAqexRqW2ljEa/+UBEDYhJGu7gJrOjSDD/7oYf5oPIwaW L2mXrTQGUG+65AAEB4wLeEqBHwl/3ulWm8dF4buMFjHWDwI/ZlslzIzracy0nbWkor5/ 3/n1ASSbiEwA8XWWEpxT0jxJBvBSX9fRx2hVp0fLhc51Ul7JCs7cOUUqa1ovosF2V9sb ysC0t3ypTL0IbnLkHTZoQb645yd1RQ8oP92Gsez6tKFEdw6qFnuyTv16a8txKbwsuHx8 S5ig0oewl0YsyzghT3grI+voqy16vydID3sXUmgjhu16fc9U4pKF+Yr6oM05yGcZ0Q0Z 1Wzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=lcAex2iXgDPG5RtO5lyx8Pz9uPIF50Vh3qu+rIRHU/w=; b=o7FDrCo2zVGDPF8t9MpICGuRsFmH00CCvcQzAfYVmt98qqsGRcJSRdO0miioIttyZ+ Lfy8xybCltOvkbNtgwjoGGp3qWM+0TFDjhezwhrLOwjyhHBFJNsdyNXdrFbSMwJDJOaJ 9dmuWnW0QT0Xb+Ukds+Z2APs+VgP6GTH1XPBBuMo4Dz8gs9YF2uAS01wbp9dzTh9DEz8 v/WyF/uSKR1Cj/AtysWBXRWb9SWmXWxDwSCr2HVGcoJEfPtgdO8wZOxlchkHxRp/zh+e JUxeS2AyHO25jRG8AutJWzGfeY93OBXFQqfSHtE20lV+RVGCBmL77wSsR7lZi+Bhhia3 rGGQ== X-Gm-Message-State: AFeK/H05qRCevFNB/xWQr+41bWx5ypfTiM8PR8ou7aoNPBHQdEXO5RLfkMbwu0LhpK9rlw== X-Received: by 10.107.180.200 with SMTP id d191mr13844833iof.42.1490479499105; Sat, 25 Mar 2017 15:04:59 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id m71sm3013568itg.14.2017.03.25.15.04.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Mar 2017 15:04:58 -0700 (PDT) From: npostavs@users.sourceforge.net References: Date: Sat, 25 Mar 2017 18:06:21 -0400 In-Reply-To: (Paul Pogonyshev's message of "Wed, 12 Nov 2014 15:38:23 +0100") Message-ID: <87inmx57vm.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) 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: 0.7 (/) tags 19029 fixed close 19029 26.1 quit Paul Pogonyshev writes: > Request: if Emacs detects timestamp change, let it read the file and compare it with the buffer; if they are byte-to-byte identical, just ignore the timestamp. > > To reproduce: open any existing file, say 'x.txt'. Now type: > > M-! touch x.txt > > and try to edit the buffer. > > Paul This is implemented in master [1: 5a4bffb661]. etc/NEWS: ** No more prompt about changed file when the file's content is unchanged. Instead of only checking the modification time, Emacs now also checks the file's actual content before prompting the user. 1: 2016-09-02 11:44:13 -0400 5a4bffb6617a274ca19bc7f5c1b1ceb6345651ab Check actual contents before promting about changed file