Subject: Re: bug#58967: 29.0.50; `g` in list-directory fails with error

From: Eli Zaretskii <[email-masked]>
Date: Sun, 13 Nov 2022 11:48:09 +0200

> Cc: [email-masked], [email-masked]
> Date: Sat, 12 Nov 2022 22:47:45 +0200
> From: Eli Zaretskii <[email-masked]>
> 
> > Cc: [email-masked]
> > From: Stefan Kangas <[email-masked]>
> > Date: Sat, 12 Nov 2022 12:33:47 -0800
> > 
> > Thibault Polge <[email-masked]> writes:
> > 
> > > Steps to reproduce:
> > >
> > >  - M-x list-directory RET
> > >  - (Pick a directory)
> > >  - Type `g`
> > >  - Results in:
> > >     Debugger entered--Lisp error: (void-function nil)
> > >       nil()
> > >       help-mode-revert-buffer(t nil)
> > >       revert-buffer(t)
> > >       funcall-interactively(revert-buffer t)
> > >       command-execute(revert-buffer)
> > >   Instead of refreshing the view (or just doing nothing)
> > 
> > I believe that this bug was fixed on master?
> 
> No, I can reproduce it with today's master.

The problem here is that list-directory puts the buffer in Help mode,
and that mode's revert-buffer-function is inappropriate for the kind
of stuff we display in this case.

So either we change list-directory to concoct a help-xref-stack-item
which would work, or we implement a revert-buffer-function for
list-directory's buffer.

This is a very old problem: I see it as far back as Emacs 24.