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#62749: 28.2; Emacs keeps opening related file from vc-diff buffer Date: Tue, 16 May 2023 19:44:25 +0300 Organization: LINKOV.NET Message-ID: <86y1lomh92.fsf@mail.linkov.net> References: <86ttwdlffv.fsf@mail.linkov.net> <6241918f-0933-7086-e3e8-d2b2df62c302@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6869"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 62749@debbugs.gnu.org, Oleksandr Gavenko To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 16 18:53:22 2023 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 1pyxvN-0001b6-Qn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 May 2023 18:53:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyxv9-00040U-BB; Tue, 16 May 2023 12:53:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyxv4-000405-Pd for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 12:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyxv4-0008IB-I1 for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 12:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyxv4-0007AY-Dk for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 12:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2023 16:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62749 X-GNU-PR-Package: emacs Original-Received: via spool by 62749-submit@debbugs.gnu.org id=B62749.168425593527486 (code B ref 62749); Tue, 16 May 2023 16:53:02 +0000 Original-Received: (at 62749) by debbugs.gnu.org; 16 May 2023 16:52:15 +0000 Original-Received: from localhost ([127.0.0.1]:47212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyxuI-00079F-LH for submit@debbugs.gnu.org; Tue, 16 May 2023 12:52:14 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:53199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyxuE-00078l-Jn for 62749@debbugs.gnu.org; Tue, 16 May 2023 12:52:10 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9D4181BF204; Tue, 16 May 2023 16:52:03 +0000 (UTC) In-Reply-To: <6241918f-0933-7086-e3e8-d2b2df62c302@gutov.dev> (Dmitry Gutov's message of "Tue, 16 May 2023 14:46:36 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261795 Archived-At: >>> After bisecting my long .emacs config I pinpointed the culprit: >>> >>> (which-func-mode 1) >> >> Maybe 'diff-syntax-fontify' could have a similar list of minor modes >> that should be ignored. Then such a list should at least contain >> 'which-func-mode' by default. > > Do you mean that it's not feasible to fix the behavior when which-func-mode > is enabled? After debugging I realized it's not related to diff-font-lock-syntax. The problem is that 'which-func-mode' is enabled in diff-mode. 'which-function' calls 'add-log-current-defun' that calls 'add-log-current-defun-function' that is 'diff-current-defun' in diff-mode. Finally, 'diff-find-source-location' visits the source files without killing them afterwards. I guess this is related to another annoying bug: after every commit need to spend much time killing all buffers created by the commit command.