Subject: Re: bug#21969: VC opens new window to display minimal messages

From: Eli Zaretskii <[email-masked]>
Date: Sun, 22 Nov 2015 18:08:00 +0200

> From: Dmitry Gutov <[email-masked]>
> Date: Sun, 22 Nov 2015 02:04:06 +0200
> 
> Looking at the code, the main reason for this is that the '<backend> 
> diff' command is called asynchronously. Before Emacs 25, we made 
> exceptions for certain backends (Git, Hg, RCS); not sure why, maybe 
> because they're faster that the rest? They're treated the same now, 
> since ed6ce56e2.
> 
> vc-diff-internal calls the 'diff' backend command, then checks if the 
> process in its buffer has finished working and there's no output (which 
> might be the case if the command was called *synchronously*), pops a 
> window and sets up the code to be executed when the process finishes.
> 
> All of which seems reasonable: we can't really pop the window only after 
> the process finishes, because if might take some time in certain cases, 
> and the user would be still be waiting for anything to happen until then.
> 
> So, I'm not sure what's the best course of action here:
> 
> - Call 'git diff' synchronously, and leave all other backends with this 
> problem.
> 
> - Call all 'diff' commands synchronously, and disregard the backends 
> that might respond slowly to this command; the user will wait.
> 
> - Invent some other solutions, like introduce a timeout which we might 
> wait for the backend to respond before popping the window, and abort (?) 
> if the user interacts with Emacs during that time.
> 
> Suggestions welcome.

Why not always show the output in a window, and remove the code that
shows it in the echo area?