unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: Re: Returning focus to Mutt
Date: 05 Jan 2003 14:41:02 +0900	[thread overview]
Message-ID: <87adig887l.fsf@tc-1-100.kawasaki.gol.ne.jp> (raw)
In-Reply-To: mailman.111.1041740911.16962.help-gnu-emacs@gnu.org

Michael Herman <michael@thehermans.org> writes:
> I would like to use emacsclient and have one question about it.  Is
> there a way, after closing the buffer with C-x C-#, for emacs to return
> the focus to the Mutt window?  I know I can lower the frame and get it
> out of the way but emacs still retains the focus.  

Perhaps if you could get emacsclient to create a new frame, and delete
it upon `C-x #', then your window-manager would automatically pop the
focus back to the previously focused window; otherwise I'm not sure (it
seems very hard to specifically _ask_ for the mutt window to be focused,
because how do you know which window it is?)

I think you can do this by using something like:

  ;; force emacsclient to pop up a new window/frame on edited files,
  ;; and focus it
  (setq server-window 
        (lambda (buf)
          (add-to-list 'special-display-buffer-names (buffer-name buf))
          (pop-to-buffer buf)
          (x-focus-frame nil)))

[it worked when I just tried it using `emacsclient /tmp/mutt-foo']

-Miles
-- 
The secret to creativity is knowing how to hide your sources.
  --Albert Einstein

       reply	other threads:[~2003-01-05  5:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.111.1041740911.16962.help-gnu-emacs@gnu.org>
2003-01-05  5:41 ` Miles Bader [this message]
     [not found] ` <i56iswzyrdx.fsf@mao.acc.umu.se>
2003-01-09 18:30   ` Returning focus to Mutt Edward O'Connor
2003-01-05  4:25 Michael Herman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87adig887l.fsf@tc-1-100.kawasaki.gol.ne.jp \
    --to=miles@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).