emacs-devel
[Top][All Lists]
Advanced

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

Re: save-frame-excursion?


From: Stefan Monnier
Subject: Re: save-frame-excursion?
Date: Fri, 24 Jul 2009 15:24:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

>>>> Do you know when/why it lost the focus?
>>> The org frame lost focus because focus shifted to the frame that
>>> contained the *Calendar* buffer.
>> OK, so the next question is "why/when did focus shift to the *Calendar"
>> buffer" (and just to be more clear by "why/when" I mean at the level of
>> the Elisp code, which trail of calls causes it).
> The calendar buffer was configured to be sticky in a particular frame,
> so that when emacs wanted to show that calendar buffer, it showed it in
> the different frame.

That still doesn't explain the shift of focus.

> I don't entirely understand how the stickiness happens -- configuration
> of the emacs calendar is far beyond me.

Doesn't matter.  If the code doesn't explicitly ask for a change in
focus, then there's no reason (other than to work around a bug
somewhere, probably) why we need to reset the focus via
select-frame-set-input-focus when unwinding.

That's why we need to know the detail.

> Admittedly it's unlikely (at least now) to get into a state where you
> will change the frame focus, but whenever you /do/ change the frame
> focus, wouldn't you want it restored?

Emacs almost never changes frame focus explicitly (for the good reason
that it's mighty hard to do it reliably for all possible WMs).


        Stefan




reply via email to

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