From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Running this-command in another window
Date: Thu, 22 Nov 2007 02:33:51 +0100 [thread overview]
Message-ID: <4744DC7F.6030602@gmail.com> (raw)
In-Reply-To: <4744B033.10409@gmail.com>
Lennart Borgman (gmail) wrote:
> I am trying to run the current command in another window than the window
> it was issued in. I do something like this in pre-command-hook:
>
> (select-window my-desired-window)
>
> This actually seems to do what I want most of the times, but when the
> command has something like
>
> (interactive "sRegexp\nP")
>
> the regexp can't be read. The prompt is shown, but the input goes to the
> buffer in my-desired-window.
>
> Is there any way to do what I want to do, ie run the command in
> my-desired-window?
I have found the solution. The problem was switching back to previous
window in post-command-hook. The post-command-hook is run after setting
up the minibuffer prompt and for every character entered.
The solution was just to check for (active-minibuffer-prompt).
prev parent reply other threads:[~2007-11-22 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 22:24 Running this-command in another window Lennart Borgman (gmail)
2007-11-22 1:33 ` Lennart Borgman (gmail) [this message]
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=4744DC7F.6030602@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@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.
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.