Hi Al, >>>>> Al Haji-Ali <[email protected]> writes: >> That's what I suggested before :-) >> > Ah sorry, I misunderstood your suggestion.
My bad, I was wrong. At the suggestion mentioned above, I had in mind a plan without altering `TeX-master-file'. Sorry for your confusion. > I just pushed a new version of the patch to my public repo (rebased to > master) https://github.com/haji-ali/auctex I encountered other problems, even when `TeX-output-dir' is nil: (1) It generates a buffer "<none>.tex". Try C-c C-a on just a normal latex file after setting the default value of `TeX-master' to nil. Emacs silently creates an empty buffer "<none>.tex". (2) It has trouble with opening compressed tex files. Suppose that "abc.tex" is compressed to, say, "abc.tex.gz". When the user opens it, emacs tries to open additional bogus files "abc.tex.gz.tex" and "<none>.tex". Both buffers are empty and the former has local value of `TeX-master' set to "<none>". (Of course compressed tex files can't be typeset. However, some users like me :-) compress the archived tex files and open them on later day in order to copy some paragraphs and paste them into the draft just editing now. So AUCTeX should be able to open compressed tex files without any issues.) Obviously the remaining cross dependency between `TeX-master-file' and `TeX-master-output-dir' is the origin of these troubles. I recommend to restrict call on `TeX-master-output-dir' in `TeX-master-file' within cases that the extension matches output files. Or it would be much nice if it is possible to remove the cross dependency completely. Isn't it possible to implement `TeX-master-output-dir' without calling `TeX-master-file' at all? > BTW, I added a note in `TeX-command-default` where the filename `name` > is compared to the output of `TeX-region-file` to determine if the > file comes from TeX-region-file or TeX-master-file. This is another > reason why I believe passing file-fn to TeX-command-default is more > appropriate. Agreed. The current (unmodified) implementation is ugly, IMHO. > Finally, another point I want to discuss are the latex packages that > output files in the output directory but assume that it is in the > master directory instead (For example, Uwe noticed that biblatex does > this when bibtex is used as a backend. Another package is of course > filecontents). I propose that we deal with this situation the same way > TeXLive's latexmk does: by setting the two environment variables > TEXINPUTS and BIBINPUTS to include the output directory when non-nil. > What do you think? It seems a bit redundant for me. As discussed previously, the "--output-directory" feature would have a limited scope of application because it can't handle \include on sub directories. Users who enable `TeX-output-dir' option should regard it as an auxiliary tool valid for only simple cases in the first place. Regards, Ikumi Keita
