From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <871u1zes89.fsf@yandex.ru> <5298AA77.4060009@yandex.ru> <52991737.9000904@yandex.ru> <529A0C08.8010809@yandex.ru> <529BF309.4010109@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385992422 10159 80.91.229.3 (2 Dec 2013 13:53:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2013 13:53:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 02 14:53:46 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VnTwY-0003iL-FG for ged-emacs-devel@m.gmane.org; Mon, 02 Dec 2013 14:53:46 +0100 Original-Received: from localhost ([::1]:36838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnTwY-00022Z-4k for ged-emacs-devel@m.gmane.org; Mon, 02 Dec 2013 08:53:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnTwO-0001yD-6t for emacs-devel@gnu.org; Mon, 02 Dec 2013 08:53:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnTwG-00074o-Tr for emacs-devel@gnu.org; Mon, 02 Dec 2013 08:53:36 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnTwG-00074k-Pj for emacs-devel@gnu.org; Mon, 02 Dec 2013 08:53:28 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpY5e/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2NH4NrA4hhnBmBXoMVgVE X-IPAS-Result: Av4EABK/CFFFpY5e/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2NH4NrA4hhnBmBXoMVgVE X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40894376" Original-Received: from 69-165-142-94.dsl.teksavvy.com (HELO pastel.home) ([69.165.142.94]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Dec 2013 08:53:27 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id ABB2A60CCE; Mon, 2 Dec 2013 08:53:27 -0500 (EST) In-Reply-To: <529BF309.4010109@yandex.ru> (Dmitry Gutov's message of "Mon, 02 Dec 2013 04:40:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166006 Archived-At: >> 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