3

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?

4

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.

| improve this answer | |
1

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"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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