all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: Lennart Borgman <lennart.borgman.073@student.lu.se>
Subject: RE: Q on frame focus with MS Windows
Date: Tue, 25 Oct 2005 16:43:24 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICIEAACOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <435EAFDD.2090207@student.lu.se>

It turns out that this will do the trick for me:

    (defun foo () (interactive)
      (display-buffer (get-buffer-create "foo")
      (select-frame-set-input-focus (window-frame (minibuffer-window))))

It was select-frame-set-input-focus that I was missing - in particular,
w32-focus-frame. I thought I had already tried it, but I guess not.

BTW - It seems that the problem is not just with newly created frames (which
is why I do the select-frame-set-input-focus even when no new frame is
created).  In spite of the doc string for display-buffer, on MS Windows
display-buffer always sends the focus to the displayed buffer. Try the code
I sent originally, with buffer foo already displayed in some unselected
frame.  Buffer foo's frame will get the focus, so the
minibuffer-local-completion-map binding will not be used when you hit
[next] - instead, the global binding for [next] in buffer foo is used.

Thanks, Lennart.

  reply	other threads:[~2005-10-25 23:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 20:33 Q on frame focus with MS Windows Drew Adams
2005-10-25 21:45 ` Lennart Borgman
2005-10-25 21:57   ` Drew Adams
2005-10-25 22:21     ` Lennart Borgman
2005-10-25 23:43       ` Drew Adams [this message]
2005-10-26  7:03         ` Lennart Borgman
2005-10-26 15:15           ` Drew Adams
2005-10-26 15:30             ` Lennart Borgman
2005-10-26 16:01               ` Drew Adams

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=DNEMKBNJBGPAOPIJOOICIEAACOAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=lennart.borgman.073@student.lu.se \
    /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.