Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

If PDFLaTeX fails to compile with

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help.

I want to press e to get an instance of Emacs. The cursor should be on the position of the error (if TeX knows it)

I guess i should insert

export TEXEDIT="emacs magic"

to my .bashrc but what should i type instead of magic?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Since I have always an emacs open (with an emacs server active), I personally have this

export TEXEDIT="emacsclient --no-wait +%d %s"

which makes sure that you do not open tons of emacs windows around. Otherwise, just use

export TEXEDIT="emacs +%d %s"

Both versions make emacs go to the right line.

It is important to have no space left and right of the = sign.

share|improve this answer
add comment

Useful. You can somewhat "unify" the two solutions as emacsclient has a fallback editor in case the (emacs) server is not running:

export TEXEDIT="emacsclient --alternate-editor=emacs --no-wait +%d %s"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.