GNU bug report logs - #19029
Cut down on useless "really edit the buffer?" prompts

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Wed, 12 Nov 2014 14:39:02 UTC

Severity: minor

Tags: fixed

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19029 in the body.
You can then email your comments to 19029 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19029; Package emacs. (Wed, 12 Nov 2014 14:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Pogonyshev <pogonyshev <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Nov 2014 14:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Pogonyshev <pogonyshev <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Cut down on useless "really edit the buffer?" prompts
Date: Wed, 12 Nov 2014 15:38:23 +0100
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19029; Package emacs. (Sat, 25 Mar 2017 22:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 19029 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 19029 <at> debbugs.gnu.org
Subject: Re: bug#19029: Cut down on useless "really edit the buffer?" prompts
Date: Sat, 25 Mar 2017 18:06:21 -0400
tags 19029 fixed
close 19029 26.1
quit

Paul Pogonyshev <pogonyshev <at> gmail.com> 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




Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 25 Mar 2017 22:06:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 19029 <at> debbugs.gnu.org and Paul Pogonyshev <pogonyshev <at> gmail.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 25 Mar 2017 22:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Apr 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.