Linking Xdvi and Emacs for Easy Searching

Add the following line to your .cshrc-user file:

setenv XEDITOR 'emacsclient --no-wait +%l %f'

the following line to your .emacs file:


and then to your latex document the line:


Since you have modified the .cshrc-user file, which affects all xterm windows, it is probably best to logout and in again to make sure everything is reset.

Now if you open the file in emacs, then latex it and view it in a xdvi window, the two should be linked such that if you hold the Ctrl key down and click in the xdvi window you jump to the same point of the document in the emacs window.

Note: The package recommends you deactivate it for final drafts as it can change the paragraph spacing in some cases. It also recommends you deactivate it before producing a version that you print.

To temporarily deactivate the package change the usepackage command to