Subject: Re: bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 17 Oct 2020 10:22:55 +0200

Richard Copley <[email-masked]> writes:

> A GUI dialog box pops up, "File x changed on disk. Reread from disk?"
> Click the No button. After about 500 ms. The dialog box pops up again.
> Repeat.
>
> To escape, click No and quickly kill the diff buffer, or click Yes.
>
> The dialog should certainly not be shown more than once.

The problem here is that which-function-mode tries to use
diff-find-source-location (via add-log-current-defun).
diff-find-source-location is called with a noprompt because of this, but
it's really an interactive command that's been pressed into service by
which-function-mode.

And diff-find-source-location really wants to re-visit the file, which
means that you get this prompt over and over again.

I don't really know how to fix this...  it'd be nice if
diff-find-source-location could just give up instead of re-loading the
file in this situation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no