all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Running this-command in another window
@ 2007-11-21 22:24 Lennart Borgman (gmail)
  2007-11-22  1:33 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-21 22:24 UTC (permalink / raw)
  To: Emacs Devel

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Running this-command in another window
  2007-11-21 22:24 Running this-command in another window Lennart Borgman (gmail)
@ 2007-11-22  1:33 ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-22  1:33 UTC (permalink / raw)
  To: Emacs Devel

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).

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-22  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 22:24 Running this-command in another window Lennart Borgman (gmail)
2007-11-22  1:33 ` Lennart Borgman (gmail)

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.