[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: how about a find-library-other-window command?
From: |
Drew Adams |
Subject: |
RE: how about a find-library-other-window command? |
Date: |
Tue, 19 Jun 2007 12:52:04 -0700 |
> > I've wondered in the past whether it would be feasible to have
> > C-x 4 be bound to a command which reads a key sequence then
> > executes it in another window, so that we needn't define new
> > commands for every command we want to execute in the other
> > window.
>
> This, or something similar, seems useful. I currently use a
> slightly different hack that makes "C-z FOO" do whatever "C-x
> FOO" does, but in another window. I do it by copying `ctl-x-map'
> and wrapping the entries with this:
>
> (defun other-windowize (fn)
> `(lambda ()
> (interactive)
> (switch-to-buffer-other-window
> (save-window-excursion (call-interactively ',fn)
> (current-buffer)))))
>
> No doubt there's a better way, but this seems to work well enough
> to replace many existing FOO-other-window commands, and to
> other-windowize some new things.
I like this idea a little better than David's suggestion, but I'm not sure
about the implementation. What happens if `fn' doesn't change the current
buffer? Anyway, something like this might be worth exploring. The particular
prefix key (`C-z') should be open to user configuration.