[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reverting but keeping undo
From: |
Dan Espen |
Subject: |
Re: Reverting but keeping undo |
Date: |
Thu, 30 May 2013 21:21:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I assume this change kills off the old confirmation about reverting.
>
> No, it doesn't. I never made the connection between the two in
> my mind. But I think you're on to something.
>
> FWIW, here's what I use for the revert-buffer confirmation:
>
> (advice-add 'revert-buffer :before
> (lambda (&rest _)
> (interactive (list (not current-prefix-arg)
> ;; Don't request confirmation if the
> ;; user just hit M-x revert-buffer RET.
> (eq last-command-event ?\r)))
> nil))
Sorry for the previous typo which I just noticed, I meant to type:
"First Stefan thanks for the explanation."
I just used:
(defun my-revert()
(interactive)
(message "Reverting buffer from %s" buffer-file-name)
(revert-buffer nil 1)
(message "Done"))
and bound it to a key.
With undo for reverts, I can't think of a good reason for the
confirmation. Some kind of notice in the mini buffer is still
a good idea.
--
Dan Espen
- Re: Reverting but keeping undo, (continued)
Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/30
- Re: Reverting but keeping undo, Óscar Fuentes, 2013/05/30
- Re: Reverting but keeping undo, Stefan Monnier, 2013/05/30
- Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/30
- Message not available
- Re: Reverting but keeping undo, Dan Espen, 2013/05/30
- Re: Reverting but keeping undo, Stefan Monnier, 2013/05/30
- Message not available
- Re: Reverting but keeping undo,
Dan Espen <=
- RE: Reverting but keeping undo, Drew Adams, 2013/05/30
Re: Reverting but keeping undo, Michael Heerdegen, 2013/05/31
Re: Reverting but keeping undo, Óscar Fuentes, 2013/05/31
Message not availableRe: Reverting but keeping undo, Dan Espen, 2013/05/31
Re: Reverting but keeping undo, Barry Margolin, 2013/05/31
Message not available
Re: Reverting but keeping undo, Barry OReilly, 2013/05/31