Juri Linkov writes: >>>> Anyway, pre/post hook hack is very useful, and works with many commands, but not >>>> with all, so it is not 100% failsafe and general.Try to execute Info-mode >>>> from other window but Info (shortcut 'm'). In my Emacs it does not work. >>> >>> I tried 'm' (Info-menu), and it works nicely without any problem. >>> As long as key prefixes are the same in both windows. >> >> Ok. Then perhaps I am doing something wrong? How do you run it, is the posted >> code snippet all you use, or is there something else there? For me it does not >> work at all. > > With this code snippet: > > #+begin_src emacs-lisp > (progn > (add-hook 'pre-command-hook > (lambda () > (other-window 1) > (setq this-command (key-binding (this-command-keys))))) > (add-hook 'post-command-hook (lambda () (other-window -1)))) > #+end_src > > in 'emacs -Q' type: C-x 4 4 C-h i m emacs RET > > and it opens the Emacs Manual. I tested now, and it did work. But I ended up with two info window? :) I have started with two-window setup, info and scratch, left and right and I think pre-commands created new window instead of selected the other window. You can see in the screenshot, but other than that it worked.