all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Bastien <bastienguerry@googlemail.com>
Cc: emacs-devel@gnu.org, Carsten Dominik <dominik@science.uva.nl>,
	Robert Goldman <rpgoldman@sift.info>
Subject: Re: save-frame-excursion?
Date: Sun, 26 Jul 2009 10:26:00 -0400	[thread overview]
Message-ID: <jwv1vo3fruu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87y6qcbeg6.fsf@bzg.ath.cx> (Bastien's message of "Sun, 26 Jul 2009 06:11:37 +0800")

>> A select-frame inside calendar should be undoable with just
>> a select-frame in org-mode.
> calendar-frame-setup uses `make-frame' which does not only select the
> frame, but also focuses onto it.  Hence `select-frame-set-input-focus'
> for restoring the focus in the minibuffer.

Thanks for digging deeper, so the problem is not just that focus
switches to some other frame, but that a new frame is created.
Note also that make-frame's docstring says:

   This function itself does not make the new frame the selected frame.
   The previously selected frame remains selected.  However, the
   window system may select the new frame for its own reasons, for
   instance if the frame appears under the mouse pointer and your
   setup is for focus to follow the pointer.

So the really better fix would be to make sure make-frame doesn't change
the focus (especially since the above note is not quite correct: even
for click-to-focus WMs, the new frames may get selected just by virtue
of being new, which is most likely what you're seeing).


        Stefan




  reply	other threads:[~2009-07-26 14:26 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       ` save-frame-excursion? Robert Goldman
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                 ` Stefan Monnier [this message]
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=jwv1vo3fruu.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bastienguerry@googlemail.com \
    --cc=dominik@science.uva.nl \
    --cc=emacs-devel@gnu.org \
    --cc=rpgoldman@sift.info \
    /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.