From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov 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 04:40:09 +0200 Message-ID: <529BF309.4010109@yandex.ru> References: <871u1zes89.fsf@yandex.ru> <5298AA77.4060009@yandex.ru> <52991737.9000904@yandex.ru> <529A0C08.8010809@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1385952032 8334 80.91.229.3 (2 Dec 2013 02:40:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2013 02:40:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 02 03:40:37 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 1VnJR6-0007g9-JV for ged-emacs-devel@m.gmane.org; Mon, 02 Dec 2013 03:40:36 +0100 Original-Received: from localhost ([::1]:33507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnJR5-0002mK-PO for ged-emacs-devel@m.gmane.org; Sun, 01 Dec 2013 21:40:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnJQt-0002mC-Kb for emacs-devel@gnu.org; Sun, 01 Dec 2013 21:40:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnJQl-0000Qj-8M for emacs-devel@gnu.org; Sun, 01 Dec 2013 21:40:23 -0500 Original-Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:59327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnJQl-0000Qe-1R for emacs-devel@gnu.org; Sun, 01 Dec 2013 21:40:15 -0500 Original-Received: by mail-wi0-f174.google.com with SMTP id z2so2555471wiv.7 for ; Sun, 01 Dec 2013 18:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=X6m0otlCKu4PXTJtn0BU4Bbpr8dWlLx6Nr4Z7kx+Yh0=; b=DKtUMzjM2P+HrVevdTALWn4BZ0dchx3pYlEWMiYLdPOL/b7/S/Y9rlbA51ihJCKmAp VlHzB21x30VmAJivFegEK6WzLIcizQf7crblrDLkg2pATHZv2X8vNJMn5easFKJ8Kvll ieLVJBqYoIJQx1EbDwvkEqrsfZWNbxJhuidWs3p0Suq/rqNfkWG3+Nzvc72MIXY2+nLV 2SN/5mF/R9buS2ZrUlMk/hUG4x8qPEWrfYaj/pDmWhniHL1DbnWyVVrmNEqx61/rYsk6 TeSEsPArA3k4LqM6DlIBNXadvhZQyoTMRdSbLQuipsUospkt/6mMuWQcPDRCyegEhn7m sNnw== X-Received: by 10.194.240.129 with SMTP id wa1mr50822887wjc.31.1385952014082; Sun, 01 Dec 2013 18:40:14 -0800 (PST) Original-Received: from [192.168.10.2] ([62.228.136.233]) by mx.google.com with ESMTPSA id dn2sm117596657wid.1.2013.12.01.18.40.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Dec 2013 18:40:13 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22e 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:165999 Archived-At: 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.