From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks Date: Sun, 13 Feb 2022 21:56:28 +0200 Organization: LINKOV.NET Message-ID: <86y22esesn.fsf@mail.linkov.net> References: <268cee0d-465d-b862-d1d6-f5da4d69e737@inventati.org> <9106387a-98cf-396f-bf45-ccb04581787b@yandex.ru> <864k7kfd56.fsf@mail.linkov.net> <86fsr3uen2.fsf@mail.linkov.net> <95d2d999-49ad-13c4-9f25-0935650a1e42@yandex.ru> <8635ktjfll.fsf@mail.linkov.net> <36b963e4-5af7-dd9e-af92-4404541b9f4d@yandex.ru> <86v8xjx45h.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 52349@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 13 21:19:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJLL7-0005wX-JB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 21:19:21 +0100 Original-Received: from localhost ([::1]:53826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJLL6-0005Kh-IW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 15:19:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJLKp-0005Jq-9I for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 15:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJLKp-0007kt-0J for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 15:19:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJLKo-0000rd-U5 for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 15:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Feb 2022 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52349 X-GNU-PR-Package: emacs Original-Received: via spool by 52349-submit@debbugs.gnu.org id=B52349.16447835373302 (code B ref 52349); Sun, 13 Feb 2022 20:19:02 +0000 Original-Received: (at 52349) by debbugs.gnu.org; 13 Feb 2022 20:18:57 +0000 Original-Received: from localhost ([127.0.0.1]:38978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJLKj-0000r7-Cr for submit@debbugs.gnu.org; Sun, 13 Feb 2022 15:18:57 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:40773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJLKh-0000qn-P6 for 52349@debbugs.gnu.org; Sun, 13 Feb 2022 15:18:56 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id AF1AC240005; Sun, 13 Feb 2022 20:18:49 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Sun, 13 Feb 2022 03:32:19 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226838 Archived-At: >> There is a new problem however. After starting vc-log-edit from *vc-diff*, >> and using log-edit-show-diff, it reuses the original buffer *vc-diff*. >> This is not a problem, because the buffer-local variable ‘vc-patch-string’ >> is saved in the *vc-log* buffer. But after deleting *vc-diff*, log-edit-done >> fails on the deleted vc-parent-buffer with >> Debugger entered--Lisp error: (error "Selecting deleted buffer") >> vc-finish-logentry() >> funcall-interactively(vc-finish-logentry) >> log-edit-done() >> But this is an old problem. The same error is signaled >> after typing ‘v’ in *vc-dir* buffer, then deleting the >> original *vc-dir* buffer, and trying to type ‘C-c C-c’ >> (log-edit-done) in the *vc-log* buffer. > > Seems like a slightly different issue, though. Speaking of myself only, > I can see myself casually killing the vc-diff buffer (especially if I just > displayed it with C-c C-d), but it seems less likely that I would kill the > vc-dir buffer when completing the commit. > > I suppose 'vc-diff-patch' could use a different buffer name than > "*vc-diff*" and thus avoid reusing that buffer? > > If it brings other problems somehow, oh well. An old bug is something we > can live with. Indeed, other buffer names might break user configuration. > But also note that if the patch string was passed as an argument to the > backend action, this problem might be avoided as well. I can't imagine how the problem might be avoided using an argument. The problem is in these lines in vc-finish-logentry: (pop-to-buffer vc-parent-buffer) ;; OK, do it to it (save-excursion (funcall log-operation log-fileset log-entry)) It expects to pop to the original buffer where vc-next-action was initiated.