[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to avoid superfluous output directories

From: Al Haji-Ali
Subject: Patch to avoid superfluous output directories
Date: Fri, 23 Jul 2021 18:13:13 +0100
User-agent: mu4e 1.5.13; emacs 27.2

Hello all,

I noticed one problem with the output-dir feature that I would like to patch.
In my setup I set `TeX-output-dir` by default to `build` using `setq-default` 
and set the TeX-master as a local variable.

What this means is that when the latex-mode gets applied (after a file is 
opened), TeX-region-file gets called before the local variables are hacked, and 
during this call the wrong output directory is created (since that's where the 
TeX-region file will be placed). If the output directory is in a sub-directory 
compared to master, this directory is useless and remains empty.

The attached patch fixes this by making `TeX--master-output-dir` accept an 
optional argument `ensure` which controls the creation of the directory. This 
is only done when `TeX--master-output-dir` is called from `TeX--output-dir-arg` 
but not from `TeX-region-file`.

Best regards,
-- Al

reply via email to

[Prev in Thread] Current Thread [Next in Thread]