[Top][All Lists]

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

Re: Popup when buffer file is changed on disk

From: Lennart Borgman
Subject: Re: Popup when buffer file is changed on disk
Date: Sun, 6 Feb 2005 01:51:43 +0100

----- Original Message ----- 
From: "Eli Zaretskii" <address@hidden>

> > Most IDE's prompt the user when the file is changed outside them
> > (for example by an editor such as emacs) by poping up a dialog box
> > asking the user if he/she wants to reload the file. emacs gives this
> > warning a bit too late in my opinion, i.e., when the buffer is about
> > to be modified rather than when its frame gets the focus.
> Would switching on auto-revert-mode solve your problem here?

I have been missing this feature too. Emacs behaviour is quite confusing if
you are used to the behavior Moheb mentions.

I do not believe that auto-revert-mode can do what Moheb (and I myself)
wants. What we want to happen is that Emacs should warn at the moment when
it gets focus that the file has changed.

So the message that the operating system sends to Emacs to tell it that it
has got focus must be catched by Emacs message queue and given to elisp. I
do not know exactly how to do that but it should be done by letting the
detection of the message start a timer that then runs the wanted code. (I
mean I don't remember the message name and I do not know how Emacs handles

This description is from my knowledge of w32 but I guess something similar
should apply to for example GNU/Linux?

reply via email to

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