[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Output to directory patch
From: |
Al Haji-Ali |
Subject: |
Re: Output to directory patch |
Date: |
Wed, 10 Mar 2021 12:52:22 +0000 |
User-agent: |
mu4e 1.5.8; emacs 27.1 |
Hello Ikumi,
On 09/03/2021, Ikumi Keita wrote:
> The cross dependency I talk about here is an implicit one through
> `find-file-hook'. `TeX-master-file' calls `TeX-master-output-dir', which
> calls `find-file-noselect', which in turn calls `find-file-hook'.
>
Ah, good catch. The dependency is now theoretical with the patch I sent last
time, since TeX-output-master-dir is now never called if the extension to
TeX-file-master is not an output one, additionally `find-file-noselect` should
not be called more than once to open the master file (if the master is set
correctly at least).
In any case, I agree that having to call `find-file-noselect` inside
TeX-master-file can be dangerous, because all such unintended consequences, and
other solutions should probably be sought.
> How about stopping trying to obtain the value of `TeX-output-dir' from
> master file? The purpose of my report 2[1] is to draw attention to the
> existence of cross dependency (and to suggest to work on eliminating
> it), and not to recommend to identify the proper value of
> `TeX-output-dir'.
> In my point of view,
> - it is the user's responsibility to make sure that the main and sub
> files share the common value of `TeX-output-dir' and
> - it's OK that your patch has some troubles such as ending up with error
> when the value of `TeX-output-dir' isn't coherent over the main and
> sub files (unless it causes serious problem such as deleting tex files
> or killing emacs session, of course).
>
> [1] https://lists.gnu.org/r/auctex-devel/2021-02/msg00046.html
>
Hmm.. I do think that this complicates the usage of the feature unnecessarily,
but I don't have another solution at this time that would address the issues
above.
Just to make sure, would you expect the path of the build directory to be set
relative to master or relative to the current directory?
1. If relative to master. Then users can set the default value of
TeX-output-dir (like I do) or use a directory local variable to set its value
for all files within the project directory. It does mean that
TeX-master-output-dir would have to call TeX-master-file to get the path of
master, if the argument master-file is not provided.
2. If relative to output-directory. Then users would have to set both
TeX-master and TeX-output-directory with exactly the same relative path which
seems redundant.
> Changing environment varible itself is fine, but it seems that there is
> no end if you deal with such small incompatibilities one by one.
My personal preference would be to change the environment variable since this
would deal with most of these incompatibilities (the only remaining one I could
think of is `\include`), but that can be left to a future patch.
Best regards,
-- Al
- Re: Output to directory patch, (continued)
Re: Output to directory patch, Ikumi Keita, 2021/03/07
- Re: Output to directory patch, Al Haji-Ali, 2021/03/07
- Re: Output to directory patch, Ikumi Keita, 2021/03/09
- Re: Output to directory patch,
Al Haji-Ali <=
- Re: Output to directory patch, Ikumi Keita, 2021/03/11
- Re: Output to directory patch, Al Haji-Ali, 2021/03/11
- Re: Output to directory patch, Uwe Brauer, 2021/03/11
- Re: Output to directory patch, Tassilo Horn, 2021/03/11
- [auto merged failed] (was: Output to directory patch), Uwe Brauer, 2021/03/12
- Re: [auto merged failed] (was: Output to directory patch), Tassilo Horn, 2021/03/12
- Re: [auto merged failed], Uwe Brauer, 2021/03/12
- Re: [auto merged failed], Tassilo Horn, 2021/03/12
- Re: [auto merged failed], Uwe Brauer, 2021/03/12
- Re: [auto merged failed], Tassilo Horn, 2021/03/12