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: Stefan Monnier
Subject: Re: trunk r115265: * lisp/vc/vc-dispatcher.el (vc-log-edit): Setup the Summary&Author headers.
Date: Mon, 02 Dec 2013 08:53:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> 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.

Go to your nearest file buffer and type: SPC C-x k RET
As you can see, you did choose the buffer to kill and yet you get
prompted to confirm you want to kill that buffer despite its
unsaved changes.

I think it's good to try and make the *VC-Log* (and the *mail*) buffers
behave similarly to file buffers in this respect.

>> 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.

It's probably the case that log-edit-hide-buf needs to be revisited,
since it dates to before the rewrite of display-buffer, where Martin
arranged to better be able to "undo" a display-buffer (via bury-buffer
or quit-window).


        Stefan



reply via email to

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