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

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

Re: "changed on disk" revert-buffer help text?


From: Narendra Joshi
Subject: Re: "changed on disk" revert-buffer help text?
Date: Sun, 14 Jan 2018 17:09:00 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Bob Proulx <bob@proulx.com> writes:
> But then that last paragraph says, "Usually, you should type `n' and
> then `\[revert-buffer]', to get the latest version of the file, then
> make the change again."  Isn't that exactly what the 'r' command does?
> Why isn't, "Usually you should type `r' to `\[revert-buffer]' to get
> the latest version of the file, then make the change again." the text
> there?  Is there some deeper something that is happening with 'r' that
> is hinted at there that means we wouldn't want to "usally" use it?

This is what the code does:

#+begin_src 
(cond ((memq answer '(?? ?\C-h))
               (ask-user-about-supersession-help)
               (setq answer nil))
              ((eq answer ?r)
               ;; Ask for confirmation if buffer modified
               (revert-buffer nil (not (buffer-modified-p)))
               (signal 'file-supersession
                       (list "File reverted" fn)))
              ((eq answer ?n)
               (signal 'file-supersession
                       (list "File changed on disk" fn))))
#+end_src

So, nothing happens when we press ?n.

--
Narendra Joshi



reply via email to

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