Re: master 6698677f0d3: ; vc-dir-refresh: Predicate the last change on not being in revert-buffer

Dmitry Gutov <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
On 01/09/2026 19:45, Stefan Monnier wrote:
> This counts as a code smell for me, so I'd appreciate if you could add
> a comment that describes the case that this is intended to fix.

The case seemed obvious: only move point when not in revert-buffer 
(meaning after 'g') - only during the initial printing of the buffer.

Whereas 'g' should preserve the current position - often somewhere in 
the list of changed files.

Maybe the surprising part is that 'vc-dir' unconditionally calls 
'vc-dir-refresh':

   vc-dir-refresh()
   #f(compiled-function () #<bytecode 0x18c0536a3a91>)()
   run-mode-hooks(vc-dir-mode-hook)
   vc-dir-mode()
   vc-dir("/home/dgutov/vc/emacs-master/" nil)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.