emacs-devel
[Top][All Lists]
Advanced

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

Re: trunk r115265: * lisp/vc/vc-dispatcher.el (vc-log-edit): Setup the S


From: Dmitry Gutov
Subject: Re: trunk r115265: * lisp/vc/vc-dispatcher.el (vc-log-edit): Setup the Summary&Author headers.
Date: Mon, 02 Dec 2013 04:40:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 01.12.2013 23:10, Stefan Monnier wrote:
In the case of *VC-Log* we could have a kill-buffer-hook which prompts
the user and aborts the kill if the user says he doesn't want to throw
away his incomplete comment.  But as you point out below, we could also
instead have a kill-buffer-hook which saves the incomplete comment to
log-edit-comment-ring so the buffer can be deleted without losing
valuable info and hence without prompting.

kill-buffer-hook runs when the user already chose to kill the current buffer (i.e. called kill-buffer and picked the current one), so that looks wasteful, unless the prompt is triggered by a new command that doesn't otherwise ask for any user input.

As long as the data is stored in log-edit-comment-ring I think it's OK
to kill without prompting.

Ok, so I went ahead and installed some changes in 115345 that hopefully aren't too far from what you imagined.

`log-edit-kill-buffer' does a bunch of different stuff, so I feel its presence as a separate command is justified.

I've also tried to put `log-edit-hide-buf' in kill-buffer-hook instead, but this way, opening log-edit buffer and then closing it via `log-edit-kill-buffer' made adjacent vertical splits (when present) jump too far, AFAICT because then `quit-windows-on' is called on the log-edit buffer before the log-edit-files window is deleted.

Also see the FIXME in log-edit-hide-buf.



reply via email to

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