From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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:00:32 +0300 Message-ID: <83fuulbcq7.fsf@gnu.org> References: <87vb3hgzr1.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1460833279 12169 80.91.229.3 (16 Apr 2016 19:01:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2016 19:01:19 +0000 (UTC) Cc: 23276@debbugs.gnu.org, andlind@gmail.com To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 21:01:08 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 1arVSt-00075r-NH for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Apr 2016 21:01:07 +0200 Original-Received: from localhost ([::1]:60150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVSt-0007yI-6Z for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Apr 2016 15:01:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVSp-0007vq-Ft for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 15:01:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arVSo-0005gf-M1 for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 15:01:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVSo-0005gY-Ix for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 15:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1arVSo-0003II-DQ for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Apr 2016 19:01:02 +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.146083326012648 (code B ref 23276); Sat, 16 Apr 2016 19:01:02 +0000 Original-Received: (at 23276) by debbugs.gnu.org; 16 Apr 2016 19:01:00 +0000 Original-Received: from localhost ([127.0.0.1]:37631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arVSm-0003Hw-Kr for submit@debbugs.gnu.org; Sat, 16 Apr 2016 15:01:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arVSl-0003Hk-2U for 23276@debbugs.gnu.org; Sat, 16 Apr 2016 15:00:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arVSc-0005ft-Q6 for 23276@debbugs.gnu.org; Sat, 16 Apr 2016 15:00:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVSc-0005fp-Md; Sat, 16 Apr 2016 15:00:50 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3947 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1arVSb-0003VC-UD; Sat, 16 Apr 2016 15:00:50 -0400 In-reply-to: <87vb3hgzr1.fsf@gmx.de> (message from Michael Albinus on Sat, 16 Apr 2016 20:44:18 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:116539 Archived-At: > From: Michael Albinus > Date: Sat, 16 Apr 2016 20:44:18 +0200 > Cc: 23276@debbugs.gnu.org > > Does anybody object to install the following patch in the emacs-25 branch? > > --8<---------------cut here---------------start------------->8--- > *** /home/albinus/src/emacs-25/lisp/autorevert.el.~f3653ec446ed95404889cf16c67b2d96b3955f52~ 2016-04-16 20:38:55.247491182 +0200 > --- /home/albinus/src/emacs-25/lisp/autorevert.el 2016-04-16 20:36:29.485457375 +0200 > *************** > *** 684,690 **** > ;; not to forget that. This gives undesirable results when > ;; the file's mode changes, but that is less common. > (let ((buffer-read-only buffer-read-only)) > ! (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))) > (when buffer-file-name > (when eob (goto-char (point-max))) > (dolist (window eoblist) > --- 684,691 ---- > ;; not to forget that. This gives undesirable results when > ;; the file's mode changes, but that is less common. > (let ((buffer-read-only buffer-read-only)) > ! (ignore-errors > ! (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))) > (when buffer-file-name > (when eob (goto-char (point-max))) > (dolist (window eoblist) > --8<---------------cut here---------------end--------------->8--- It should have a comment explaining why errors are being ignored. 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? Thanks.