[OS X TeX] forward and reserve search with ec-emacs and xdvi from the i_Installer

Peter Cholak Peter.Cholak.1 at nd.edu
Sat May 22 19:33:35 EDT 2004


The following are instructions on how to get forward and reverse
seacrhing to work with carbon enhanced emacs (v. 21.3.50.03.11.14.CVS)
and the xdvi from tetex installed via the i-Installer.  However things
are not perfect; please see 7 and 8.  I was hoping that someone who
knows more about emacs and OS X can help me out.

1.  add

http://cvs.sourceforge.net/viewcvs.py/xdvi/xdvik/texk/xdvik/xdvi- 
search.el?rev=1.2.4.7

to

Emacs.app/Contents/Resources/site-lisp/

2.  replace your .emacs file with

http://www.nd.edu/~cholak/dot-emacs.el

(For comments on other things that I have changed please read this  
file.)

3.  add the following line to your .Xdefaults file.

xdvi.editor:/Applications/Emacs.app/Contents/MacOS/bin/Emacs-server +%l  
%f

4.  add the following lines to your .cshrc

setenv TEXBIB ".:/Users/cholak/Library/texmf/bibtex/bib//"
setenv DISPLAY "localhost:0.0"
alias ec-emacs /Applications/Emacs.app/Contents/MacOS/Emacs


5.  Now to edit foo.tex.
     a. start X11
     b. in xterm or a terminal window run "xdvi foo.dvi &"
     c. in an xterm or terminal window run "ec-emacs foo.tex &"
     (The order in which 5b or 5c are done does not matter.)

6.  Use C-C C-x to forward search and C-click to research search. If
     you kill xdvi restart as in 5b.

7.  It would be nice to be able to use C-c C-c to start xdvi from
     emacs. But there is something wrong with this.  Somehow ec-emacs
     thinks these is a process running and wants to kill it before
     doing anything, like LaTeX again, to the file.

     I think it is in way ec-emacs starts xdvi.  I might be wrong about
     this but I far as I can see there is no different to OS X how xdvi
     was launched.  So I think the function TeX-run-view-command is not
     perfect.  Using TeX-run-command in the above function is not
     correct.  But Tex-run-silent or TeX-run-background do not work
     either (they do launch xdvi).

     It was suggested else to change how latex is called but this
     does not work. (Change TeX-run-LaTeX to TeX-run-silent but this
     does not let you know if there are latex errors.)

     This suggestion was at

http://latex.yauh.de/faq/ 
index.phpaktion=artikel&rubrik=002003&id=103&lang=en

    This seems to be for a older version of ec-emacs but it more or less  
correct.


8.  One can forgo 5c and start emacs from the finder at the price that
     bib-cite will not work properly.  Bib-cite needs some env variable
     like TEXBIB to point to the /bib files.  It is on the wish list to
     add kpsepath functional to bib-cite.  How one does pass variables
     via the finder?


-Peter

PS.  I read this list via digest.  So if you want me to reply cc me too.

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list