bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#21969: VC opens new window to display minimal messages
Date: Sun, 22 Nov 2015 02:04:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0

On 11/21/2015 03:55 PM, David Reitter wrote:
At some point on the way to Emacs 25, VC has begun creating new windows to 
display messages that would more appropriately fit into the echo area.

For example, you do C-x =, it’ll display a “no revisions between working 
revision and work file” message.  But that is shown in the echo area AND a 
newly created window.

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]