Auto-focus xdvi after running viewdvi in Emacs with AUCTeX.
Posted
by D Connors
on Super User
See other posts from Super User
or by D Connors
Published on 2010-05-12T15:36:11Z
Indexed on
2010/05/12
15:44 UTC
Read the original article
Hit count: 193
I've been using emacs with AUCTeX mode to edit my latex documents for a few days now, but there's something that's really bugging me. As it should be, whenever I do C-c C-c RET it compiles the file, and if repeat the command it views the output in xdvi. It's also set to the mini-mode TeX-source-specials-mode, so instead of opening a new window in xdvi it only reloads the window that's already open, brings it to the front, and sends me to wherever the pointer was in emacs (forward search).
Now here's the problem:
Even though the xdvi window is brought to the front, it's not focused. Instead, the emacs windows stays with focus (and that's where any keyboard input goes). And I keep forgetting about that, which leads me to accidentally editing the source file while trying to navigate in xdvi. Not to mention I'm forced to alt-tab in order to focus xdvi, and alt-tab twice if I just want to get back to emacs.
Is there a way around this problem? I just want xdvi to be focused whenever I run the view command from emacs.
© Super User or respective owner