From: Robert Goldman <rpgoldman@sift.info>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Bastien <bastienguerry@googlemail.com>, emacs-devel@gnu.org
Subject: Re: save-frame-excursion?
Date: Thu, 23 Jul 2009 22:28:42 -0500 [thread overview]
Message-ID: <4A692A6A.4080601@sift.info> (raw)
In-Reply-To: <jwv63dihixp.fsf-monnier+emacs@gnu.org>
Stefan Monnier wrote:
>>> 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.
I don't entirely understand how the stickiness happens -- configuration
of the emacs calendar is far beyond me.
>
>> I am not that experienced in this area, but as far as I can tell
>> save-window-excursion covers similar ground, but only controls what
>> window is selected /within a given frame/. So this macro, on which I
>> based org-save-frame-excursion covers similar ground, but it does not
>> subsume this macro.
>
> I know neither subsumes the other (sadly). I just hope new ones can be
> made a bit more orthogonal (i.e. with less overlap).
Right. I believe that these need to be done "inside to out" i.e.,
(save-excursion
(save-window-excursion
(org-save-frame-excursion
....)))
in order that they unwind properly.
What I think is at least a bit odd is that I don't know of a case where
one would /not/ want the current frame focus to be restored when doing a
save-excursion. 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?
But this may simply expose my naiveté about emacs.
Best,
r
next prev parent reply other threads:[~2009-07-24 3:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 17:30 save-frame-excursion? Bastien
2009-07-23 20:56 ` save-frame-excursion? Stefan Monnier
2009-07-24 2:24 ` save-frame-excursion? Robert Goldman
2009-07-24 3:16 ` save-frame-excursion? Stefan Monnier
2009-07-24 3:28 ` Robert Goldman [this message]
2009-07-24 19:24 ` save-frame-excursion? Stefan Monnier
2009-07-24 21:18 ` save-frame-excursion? Robert Goldman
2009-07-25 14:39 ` save-frame-excursion? Stefan Monnier
2009-07-25 11:42 ` save-frame-excursion? Bastien
2009-07-25 14:42 ` save-frame-excursion? Stefan Monnier
2009-07-25 22:11 ` save-frame-excursion? Bastien
2009-07-26 14:26 ` save-frame-excursion? Stefan Monnier
2009-07-26 17:00 ` save-frame-excursion? Drew Adams
2009-07-27 3:42 ` save-frame-excursion? Bastien
2009-07-27 4:50 ` save-frame-excursion? Stephen J. Turnbull
2009-07-27 4:58 ` save-frame-excursion? Bastien
2009-07-27 17:49 ` save-frame-excursion? Stefan Monnier
2009-07-27 21:05 ` save-frame-excursion? Bastien
2009-07-28 2:25 ` save-frame-excursion? Stefan Monnier
[not found] ` <87iqhhasm3.fsf@bzg.ath.cx>
2009-08-03 4:38 ` save-frame-excursion? Carsten Dominik
2009-08-03 12:50 ` save-frame-excursion? Robert Goldman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A692A6A.4080601@sift.info \
--to=rpgoldman@sift.info \
--cc=bastienguerry@googlemail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.