GNU bug report logs -
#62749
28.2; add-log-current-defun doesn't clean up its temporary buffers
Previous Next
Full log
View this message in rfc822 format
Hi! Thanks for the report.
On 10/04/2023 15:11, Oleksandr Gavenko wrote:
> In GNU Emacs 28.2 (build 1, x86_64-pc-cygwin)
> of 2022-09-16 built on fv-az140-985
> Repository revision: 70134aa8264ded36d80248204b2ba43ae3d8f599
>
> Whenever I open vc-diff buffer by "d" (log-view-diff) to read repository
> history from "C-x v L" (vc-print-root-log) Emacs opens all files referenced by
> diff.
>
> The diff might be very big so:
>
> * I end with lots of opened files that I need eventually close.
> * Emacs pollutes recentf history - I don't want robotically opened file mixed
> with human opened files.
> * Cygwin is slow (especially under antivirus supervision) file opening delays
> Emacs for many seconds.
>
> Initially I asked for help in Emacs 27.1:
>
> https://emacs.stackexchange.com/questions/61760/lags-when-navigating-vc-root-diff-buffer/
>
> and found workaround with:
>
> (setq diff-font-lock-syntax nil)
This workaround should help, in particular to improve performance under
Cygwin.
The thing about opened files is quite odd, though:
diff-syntax-fontify-hunk does not visit any new files. It either uses an
existing buffer, or fetches file contents using insert-file-contents, or
calls vc-find-revision-no-save which, again, inserts the previous'
revision file contents into the provided buffer, without visiting a file.
Perhaps you could edebug diff-syntax-fontify-hunk to find the exact
place where a file is visited (and added to recentf), if that indeed
happens.
This bug report was last modified 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.