bug#42570: tex-mode compiles / builds only in /tmp
emacs 26.3. 2 different builds. 2 distinct OSs.
One build is custom inside Slackware; another build is standard issue from Fedora 32.
Results below are identical for both situations.
If the tex / latex source (or a symbolic link) resides in /tmp directory, everything from the tex mode menu functions as expected.
If the source is anywhere else in the directory structure, the first step, compilation (tex / latex), fails because it can *not* find the source file. Yet, if I use my own custom elisp script or invoke the relevant commands manually, there is *no* problem.
The builtin tex-mode.el script seems to expect all code to be only in /tmp or nothing will occur.
Am I missing something? A variable setting? Some other configuration aspect?
I have tried the tests you suggest on refcard.tex (plus a few others in that dir) with & without -Q cl switch; nearly all failed to produce a dvi. Immediately tex fails since it can *not* find the source file as I described previously. (Also review additional material in bug 42624.) The results are identical on both a Slackware-current partition installation & on a Fedora 32 partition installation.
The Texlive installations are current & direct compilation on any tex / latex source files functions flawlessly. I also have a tiny piece of lisp code that directly invokes, via start-process, the tex / latex compiler; it, too, never has a problem.
Reiterating, the tex-shell created by tex-mode.el does *not* see a path to the source unless modifications I suggest are made as in bug 42624.
Is this possibly a configuration issue? Could there be hidden environmental variables that need to be set either in my bash shell or something I am missing in the init.el? Official emacs documentation about tex-mode says little about this matter. As an aside, inside tex-mode.el, there is a getenv ESHELL command. Does ESHELL need some special attention?