Tak Kunihiro <[email protected]> writes: Hi Kunihiro,
> (defun sesame-TeX-jobname () > "Return option `-jobname' or empty string." > (TeX-active-master-with-quotes nil t) > ;; " -jobname=LaTexMkJob" > "") > > (defun sesame-TeX-outdir (&optional looptex-p) > "Return option `-outdir' or empty string." > (TeX-active-master-with-quotes nil t) > " -outdir=~/deleteme.d") > > Messages I expect and I got then are shown below. > > expect: Running `make' on `report' with ``latexmk -interaction=nonstopmode > -file-line-error report.tex'' > I got: Running `make' on `report' with ``latexmk > -interaction=nonstopmode%(outdir) -file-line-error report.tex'' > > It seems that when TeX-active-master-with-quotes is called > from TeX-command-expand, something happens. Yes, indeed. `TeX-active-master-with-quotes' expects that its value is actually inserted into the expansion and thusly it increase `TeX-expand-pos' accordingly. Therefore, matching continues further behind so that %(outdir) doesn't get expanded. AFAICS, the docstring of `TeX-active-master-with-quotes' is pretty clear about that. In your example config, you call `TeX-active-master-with-quotes' for no reason. Why do you do that? Bye, Tassilo
