|
From: | Lennart Borgman (gmail) |
Subject: | Re: Running this-command in another window |
Date: | Thu, 22 Nov 2007 02:33:51 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
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 in Thread] | Current Thread | [Next in Thread] |