bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36159: [PATCH] auto-revert mode doesn't work when changing buffer fi


From: Michael Albinus
Subject: bug#36159: [PATCH] auto-revert mode doesn't work when changing buffer file name
Date: Tue, 11 Jun 2019 15:15:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Mattias Engdegård <mattiase@acm.org> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]