Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliably determine latexmk's aux_dir and out_dir using -dir-report #970

Conversation

gnull
Copy link
Contributor

@gnull gnull commented Nov 27, 2023

(Merging into feature branch of #968.)

This commit makes texlab determine aux_dir and out_dir variables by calling

latexmkrc -dir-report $TMPDIR/NONEXISTENT.tex

Passing NONEXISTENT file is a hack to prevent latexmk from building anything. And the $TMPDIR part should ensure 100% that this file does not exist (to avoid event rarest cases when user may have a file called NONEXISTENT.tex in current working directory).

This should be a more correct than latexmk -r $TMPDIR/latexmkrc, since -dir-report was intended exactly for this and it prints normalized values.

This commit makes texlab determine aux_dir and out_dir variables by
calling

  latexmkrc -dir-report $TMPDIR/NONEXISTENT.tex

Passing NONEXISTENT file is a hack to prevent latexmk from building
anything. And the $TMPDIR part should ensure 100% that this file does
not exist (to avoid event rarest cases when user may have a file called
NONEXISTENT.tex in current working directory).

This should be a more correct than `latexmk -r $TMPDIR/latexmkrc`, since
-dir-report was intended exactly for this and it prints normalized
values.
@pfoerster pfoerster merged commit 13afd86 into latex-lsp:feature/latexmkrc-auto-config Nov 27, 2023
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants