From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#36159: [PATCH] auto-revert mode doesn't work when changing buffer file name Date: Tue, 11 Jun 2019 15:15:19 +0200 Message-ID: <8736kgjmag.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="84003"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36159@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 11 15:16:56 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hagdz-000Lj6-VP for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2019 15:16:56 +0200 Original-Received: from localhost ([::1]:58746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hagdy-0006TP-Vh for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2019 09:16:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49796) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hagd9-0006Ra-9D for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 09:16:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hagd8-0002T6-6F for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 09:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hagd7-0002Sr-Vh for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 09:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hagd7-000219-NM for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 09:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2019 13:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36159-submit@debbugs.gnu.org id=B36159.15602589437728 (code B ref 36159); Tue, 11 Jun 2019 13:16:01 +0000 Original-Received: (at 36159) by debbugs.gnu.org; 11 Jun 2019 13:15:43 +0000 Original-Received: from localhost ([127.0.0.1]:58172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hagco-00020a-KW for submit@debbugs.gnu.org; Tue, 11 Jun 2019 09:15:42 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:43285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hagcm-00020L-4C for 36159@debbugs.gnu.org; Tue, 11 Jun 2019 09:15:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1560258926; bh=YVGdvMxJI96f2t9+aOawbBrX+3Mrn52854T/JEyyROU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=fZMol8Mpdjve8daAOc0psRXweZv9MWeC64zpiqfy8wjaRO9tPPbAMvNQj6DOU78RV 9HLdTKKydCPJIkLoWsN0+cl1iAD8MFuB2vJds840OVlUjhwpsjChOyrzkNzPrpam8D 7hoJWBN68EhZWZwQ/rOgPga/vcSGxtfFhMnPWPtw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.38.115]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LtZcC-1gZtLl36ai-010wbI; Tue, 11 Jun 2019 15:15:25 +0200 In-Reply-To: ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Mon, 10 Jun 2019 18:57:04 +0200") X-Provags-ID: V03:K1:O/pqjCvZ7Y4G2/ot/vZXraW/Ayjq1md0JciY7lvum4sUs1GCBPY dFQl6Ud+g6mYgiRg/shd7+f0gP5KCXysArxxp3AkjQVt3c3clNvX8iRSPIGNLiwnazxp52N nH8n+PkxqX+C5jkuJboquRocVCMykcGlpX/2NOT1QUAW+0wIdaJ0IfDhj88FR/l3ABrTCIJ OiNXckfDkMtTCeGDzfTAA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ILs1/hnumt0=:Bw88/IPvNKurr3Mg3ZHuc2 tlGiH6H7gXLpXCTVSyfgL5i9ymd9MmdCA9i6QM1SDAOLbDTPDqCWKPiV8UZ9BPXP5GUYD3iR3 mKs0AGo+k/5OKzGWxfngca+sHZ5RIkrXzxFdgfjRuFIVDJyGVc0GpoZe6OBdetW0KHRMoHm4L 4Ms1A93nxpXUe8azPBvljHnjBhzbbHi+IzrkGHfT8/az21KDt5pODYgBJn5D5OBEgj6BXqKh4 b8FksPS+AsjOzsepe8TxMwW3F4r6kf92nWslN0cokMo84E/Bzmg2lPzP8ktScdQS3j5tyrjLb RAHv57FdEc15Nu6bqYzEp8nJVgivcE1WW9guXgf4Phefz1nyFro/pSucXa6wG61lpsr6a7Cd4 1uVMiJygZAnG8IYYr8oHKaXEQdlrhm/Vzy47K4obMDwO2uIPJNU83RuUndQI+Ao3hQICZai/B CN5TTSgx/tNr1fTbCxJZOI2DExi0nX4qfu9LoGioQxM7n/OZtQkl9JxhTo1UvtvF+tY0R6sz2 1YQLtIPI+zKcuaDvvnhhJ834yXSWk1eQBdOfHCFCWxqtwquywQZORwpLXqIR/A7eCtQtwanxi fwbv/lYPZicKU0qA46Sqel1I21n1rkx1xwLDT7LjOjgdro5uf7GGmzOS5g9vfzuVvdevZXa/0 UAxQDMG8f485fMcejk0dXFNcLXwrSsNoWR//6A9a9rd/i6hZyCjaJQbK6s0P1SH2w1ef3AEyW 9Cf0ocq7UjS+OLu7dZTa8y0XD4Zhbme3XvRbBEuPQcD1rlIF05TagjYPo8Ix5eO8xOkCwfHa 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: 209.51.188.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:160363 Archived-At: Mattias Engdeg=C3=A5rd writes: Hi Mattias, > Auto-revert mode stops working effectively when the user changes the > buffer file name, by running `write-file' for example, because the > notifier still tracks the old file. > > The attached patch attempts to rectify this. LGTM. Two minor nits: > +(defun auto-revert--set-visited-file-name () Since we add it to a hook from another package, it shouldn't be marked internal. Call it `auto-revert-set-visited-file-name'. > + (should (equal (buffer-string) "C")))) > + (ignore-errors (kill-buffer buf)) > + (ignore-errors (delete-file file-1)) > + (ignore-errors (delete-file file-2))))) In the other tests, we separate the unwindforms from the bodyform (an empty line, plus a comment). Maybe you could do it here as well. For me, the last two tests fail in the remote case: 2 unexpected results: FAILED auto-revert-test05-global-notify-remote FAILED auto-revert-test06-write-file-remote Do you want to check, or shall I do it? Best regards, Michael.