From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#19029: Cut down on useless "really edit the buffer?" prompts Date: Wed, 12 Nov 2014 15:38:23 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ec8d810c6cc0507aa59e7 X-Trace: ger.gmane.org 1415803161 5595 80.91.229.3 (12 Nov 2014 14:39:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2014 14:39:21 +0000 (UTC) To: 19029@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 12 15:39:14 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XoZ4j-0004Z8-M0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Nov 2014 15:39:13 +0100 Original-Received: from localhost ([::1]:55106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ4j-0003Ak-9x for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Nov 2014 09:39:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ4d-00036i-NH for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:39:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoZ4Z-0002jb-5I for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:39:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoZ4Z-0002jW-2Z for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XoZ4Y-000703-Pv for bug-gnu-emacs@gnu.org; Wed, 12 Nov 2014 09:39:02 -0500 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141580311526869 (code B ref -1); Wed, 12 Nov 2014 14:39:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Nov 2014 14:38:35 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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== X-Received: by 10.107.131.85 with SMTP id f82mr48794102iod.31.1415803103657; Wed, 12 Nov 2014 06:38:23 -0800 (PST) Original-Received: by 10.43.2.132 with HTTP; Wed, 12 Nov 2014 06:38:23 -0800 (PST) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95905 --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--