unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Juri Linkov <juri@linkov.net>, Oleksandr Gavenko <gavenkoa@gmail.com>
Cc: 62749@debbugs.gnu.org
Subject: bug#62749: 28.2; Emacs keeps opening related file from vc-diff buffer
Date: Tue, 16 May 2023 14:46:36 +0300	[thread overview]
Message-ID: <6241918f-0933-7086-e3e8-d2b2df62c302@gutov.dev> (raw)
In-Reply-To: <86ttwdlffv.fsf@mail.linkov.net>

On 15/05/2023 19:46, Juri Linkov wrote:
>> After bisecting my long .emacs config I pinpointed the culprit:
>>
>> (which-func-mode 1)
>>
>> During the movement through a diff buffer this mode loads corresponding
>> files:
>>
>>    if the cursor reaches a new hunk - the corresponding file is opened ((
>>
>> This is done one by one file while I scroll down with the cursor.
>>
>> Removing the line significantly improved performance during scromming in VC
>> diff buffer in Cygwin and no more new files opened!
> This is an interesting problem, I can reproduce it by
> 'M-x which-function-mode'.
> 
>> I think which-function-mode is broken for diff-mode, the workaround for
>> those who wants this mode is to deal with:
>>
>> (defcustom which-func-modes t
>>    ;; '(emacs-lisp-mode c-mode c++-mode objc-mode perl-mode cperl-mode python-mode
>>    ;;               makefile-mode sh-mode fortran-mode f90-mode ada-mode
>>    ;;               diff-mode)
>>    "List of major modes for which Which Function mode should be used.
>> For other modes it is disabled.  If this is equal to t,
>> then Which Function mode is enabled in any major mode that supports it."
>>
>> What are the next actions?
> 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?





  reply	other threads:[~2023-05-16 11:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 12:11 bug#62749: 28.2; Emacs keeps opening related file from vc-diff buffer Oleksandr Gavenko
2023-04-10 12:14 ` Oleksandr Gavenko
2023-04-10 22:23 ` Dmitry Gutov
2023-05-14 10:59   ` Oleksandr Gavenko
2023-05-15 16:46     ` Juri Linkov
2023-05-16 11:46       ` Dmitry Gutov [this message]
2023-05-16 16:44         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6241918f-0933-7086-e3e8-d2b2df62c302@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=62749@debbugs.gnu.org \
    --cc=gavenkoa@gmail.com \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).