From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#23276: 25.0.92; Crash in auto-revert when file no longer present Date: Sat, 16 Apr 2016 22:56:41 +0200 Message-ID: References: <87vb3hgzr1.fsf@gmx.de> <83fuulbcq7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c122e5c508f070530a05d24 X-Trace: ger.gmane.org 1460840246 12961 80.91.229.3 (16 Apr 2016 20:57:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2016 20:57:26 +0000 (UTC) Cc: 23276@debbugs.gnu.org, Michael Albinus To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 22:57:11 2016 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 1arXHC-0007eZ-LS for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Apr 2016 22:57:10 +0200 Original-Received: from localhost ([::1]:33404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arXHC-0004t5-18 for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Apr 2016 16:57:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arXH7-0004pe-Em for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 16:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arXH4-0005aZ-8F for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 16:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arXH4-0005aV-5j for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 16:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1arXH4-000633-1O for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 16:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Apr 2016 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23276-submit@debbugs.gnu.org id=B23276.146084020823221 (code B ref 23276); Sat, 16 Apr 2016 20:57:01 +0000 Original-Received: (at 23276) by debbugs.gnu.org; 16 Apr 2016 20:56:48 +0000 Original-Received: from localhost ([127.0.0.1]:37654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arXGq-00062T-JQ for submit@debbugs.gnu.org; Sat, 16 Apr 2016 16:56:48 -0400 Original-Received: from mail-vk0-f46.google.com ([209.85.213.46]:33351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arXGp-00062E-MS for 23276@debbugs.gnu.org; Sat, 16 Apr 2016 16:56:47 -0400 Original-Received: by mail-vk0-f46.google.com with SMTP id n62so67333686vkb.0 for <23276@debbugs.gnu.org>; Sat, 16 Apr 2016 13:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=MZXrQCbeu29eVU6+rqWfuPlk6iZwsRYWpiF73BfjuUs=; b=jQ6wlj8sYJ1e1O4cX3ZkjZ/1nXkp1dOTmuSqt39TXv6h2Ezi1Omq6zwW66B+6yh8bq t+3ozYJTzeSElTsF3pYSOX+DYl/Nax10MtkaqE5rev8/G3V3iXdLh1c2cj4AIIiqsnMT C7+8Fx1i75sW6mSzkXgm+fpK4eVEkciVZFiQzAF27MZSjWjroQjAZ6PvfyKNufW4rMDd /LRZFzKNctuIkTPXLAK7w7H1nBqAnRhPxRPjZAc9mDCrRCk3VGAXEfGcxuYeXEPMqK4f iRWJbQn+Jfg0QHn0WymKGYAa5rL04EhLOfzaplCOMZjEyukIYrzcpk/y8MY9A7o0Sh2m dZuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=MZXrQCbeu29eVU6+rqWfuPlk6iZwsRYWpiF73BfjuUs=; b=W4+akI6z0a+tngGwMOVIjhVSsX6g3XBGIWTJuhOCpkLx71t1UfiLqd8NKNy/poWXXQ lKLe4K4GcWHAiCYzvcgKWPqrrEXxjjrtYAlISRj8oB+uRW6P1IKTAJMle/6D9ESCxl9a Ra9JuG4+i6uvw8ws6azMm+pWx78T8m5ACTkGoMG1afGyglir9/Kj3xh0aOt0zVvlBLLy f3Ziz5Q8WaIWPsEmUAj06HQN/z+T/w8aY/eL8Jt1MqtimOtmV2WB3QxGh7v6xwYFWng7 qe+Gs1SEEg2xIJA3So6jLNMdyDiXb6Qn4zX1dnNcyceQr/cwuDtDvhZbk3ZYikt6FkfE EAlg== X-Gm-Message-State: AOPr4FX/Q4W+LnnKhwGJd5CWmk0QoYJGKiYqtOjfScqzzSZmYwP4iyw9CuKzzaEjAJBIXrG+YW5IxWpfegB8cQ== X-Received: by 10.176.6.102 with SMTP id f93mr12623085uaf.59.1460840202012; Sat, 16 Apr 2016 13:56:42 -0700 (PDT) Original-Received: by 10.31.214.131 with HTTP; Sat, 16 Apr 2016 13:56:41 -0700 (PDT) In-Reply-To: <83fuulbcq7.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:116542 Archived-At: --94eb2c122e5c508f070530a05d24 Content-Type: text/plain; charset=UTF-8 > > And I still am not convinced that deleting a file under auto-revert > shouldn't erase its buffer. Otherwise, it sounds like just > half-auto-revert to me. Would we keep the buffer non-empty if the > file existed but was empty? > When I originally wrote auto-revert mode I decided that Emacs should not clear a buffer when the corresponding file was removed, as a safeguard against a file accidentally being removed. Today, I still think that is the correct way to handle this situation. The current patch handles a special case when the file is removed after it has been decided that it should be reverted, but right before the actual revert -- it should be treated just like a normal file delete. I think disabling auto-revert mode is not correct way to handle this -- the file might be temporary removed by, say, a version control system and might reappear a moment later, in which case we want it to be reverted into Emacs. -- Anders --94eb2c122e5c508f070530a05d24 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
And I still am not convinced that deleting a fil= e under auto-revert
shouldn't erase its buffer.=C2=A0 Otherwise, it sounds like just
half-auto-revert to me.=C2=A0 Would we keep the buffer non-empty if the
file existed but was empty?

When I orig= inally wrote auto-revert mode I decided that Emacs should not clear a buffe= r when the corresponding file was removed, as a safeguard against a file ac= cidentally being removed. Today, I still think that is the correct way to h= andle this situation.

The current patch handle= s a special case when the file is removed after it has been decided that it= should be reverted, but right before the actual revert -- it should be tre= ated just like a normal file delete.

I think disab= ling auto-revert mode is not correct way to handle this -- the file might b= e temporary removed by, say, a version control system and might reappear a = moment later, in which case we want it to be reverted into Emacs.

=C2=A0 =C2=A0 -- Anders

--94eb2c122e5c508f070530a05d24--