Discussion:
[AUCTeX] Repeat TeX-command-run-all without buffer change
Thorsten Grothe
2017-05-04 13:19:38 UTC
Permalink
Hi list,

the command TeX-command-run-all sometimes not detects that another latex
run is necessary. That's no problem one could hit C-c C-a again, but this
does only work for me if the buffer changes (add a word or delete a
whitespace). I find this inconvenient. For example in Texstudio one can
hit the compile command several times behind each other.

What can I do to fix that?

Regards

Thorsten Grothe
Mosè Giordano
2017-05-06 17:39:35 UTC
Permalink
Hi Thorsten,
Post by Thorsten Grothe
Hi list,
the command TeX-command-run-all sometimes not detects that another latex
run is necessary. That's no problem one could hit C-c C-a again, but this
does only work for me if the buffer changes (add a word or delete a
whitespace). I find this inconvenient. For example in Texstudio one can
hit the compile command several times behind each other.
What can I do to fix that?
In previous versions of AUCTeX, you had to manually run C-c C-c
multiple times in order to fully compile the document, being the
default command suggested by AUCTeX decided by `TeX-command-default'.
C-c C-a is a recent addition to AUCTeX, it automatically runs all
commands detected by `TeX-command-default', it makes the sequence C-c
C-c RET C-c C-c RET... completely automatic. In most cases, C-c C-a
runs LaTeX, the bibliography engine, and makeindex the right number of
times. If you believe that sometimes `TeX-command-default' fails to
detect a necessary command, please share this situation so that we can
improve its logic.

In any case, when you need to manually run a command (say, LaTeX), you
can always use good ol' C-c C-c.

Bye,
Mosè
Thorsten Grothe
2017-05-06 20:05:36 UTC
Permalink
Hi Mosè,

* Mosè Giordano: 06.05.2017 (17:39):

[...]
Post by Mosè Giordano
If you believe that sometimes `TeX-command-default' fails to
detect a necessary command, please share this situation so that we can
improve its logic.
thanks for your response, this is simple example for this situation,
it's from the exsheets package. Change the points in the question
environments and run TeX-command-run-all and see the value of
\totalpoints, here I have to run it again to get the right value :-)
BTW. with latexmk it works fine.


\documentclass{article}
\usepackage{exsheets}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{question}{50} % → change here
\end{question}

\begin{question}{50} % → change here
\end{question}

Here we need at least 3 LaTeX runs, \verb!TeX-command-run-all does not see this:!
\totalpoints
\end{document}


Regards

Thorsten Grothe
Mosè Giordano
2017-05-08 18:06:00 UTC
Permalink
Hi Thorsten,
Post by Thorsten Grothe
Hi Mosè,
[...]
Post by Mosè Giordano
If you believe that sometimes `TeX-command-default' fails to
detect a necessary command, please share this situation so that we can
improve its logic.
thanks for your response, this is simple example for this situation,
it's from the exsheets package. Change the points in the question
environments and run TeX-command-run-all and see the value of
\totalpoints, here I have to run it again to get the right value :-)
BTW. with latexmk it works fine.
\documentclass{article}
\usepackage{exsheets}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{question}{50} % → change here
\end{question}
\begin{question}{50} % → change here
\end{question}
Here we need at least 3 LaTeX runs, \verb!TeX-command-run-all does not see this:!
\totalpoints
\end{document}
Thanks for the example. AUCTeX reads the output buffer to decide
whether it needs to run LaTeX again. Some packages emit warnings in
the log to suggest that LaTeX should be run again (only when really
necessary, otherwise would be useless), but here there is nothing that
can help AUCTeX. Maybe ask this feature to the package author?

Regarding latexmk, it runs twice LaTeX on this simple document

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[ngerman]{babel}
\begin{document}
Hello, world!
\end{document}
--8<---------------cut here---------------end--------------->8---

so probably doesn't do anything special with exsheets package.

Bye,
Mosè
Thorsten Grothe
2017-05-09 15:21:18 UTC
Permalink
Hi Mosè,

* Mosè Giordano: 08.05.2017 (18:06):

[...]
Post by Mosè Giordano
Thanks for the example. AUCTeX reads the output buffer to decide
whether it needs to run LaTeX again. Some packages emit warnings in
the log to suggest that LaTeX should be run again (only when really
necessary, otherwise would be useless), but here there is nothing that
can help AUCTeX. Maybe ask this feature to the package author?
Regarding latexmk, it runs twice LaTeX on this simple document
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[ngerman]{babel}
\begin{document}
Hello, world!
\end{document}
--8<---------------cut here---------------end--------------->8---
so probably doesn't do anything special with exsheets package.
ok, I created a new issue on the authors page. See here:

https://bitbucket.org/cgnieder/exsheets/issues/42/number-of-latex-runs-to-get-totalpoints

Maybe he can do something :-)

Regards

Thorsten Grothe
Thorsten Grothe
2017-05-14 17:47:07 UTC
Permalink
* Mosè Giordano: 08.05.2017 (18:06):


[...]
Post by Mosè Giordano
can help AUCTeX. Maybe ask this feature to the package author?
see here for the response of Clemens:

fhttps://bitbucket.org/cgnieder/exsheets/issues/42/number-of-latex-runs-to-get-totalpoints#comment-36774072


Regards

Thorsten Grothe
Mosè Giordano
2017-05-14 17:53:32 UTC
Permalink
Hi Thorsten,
Post by Thorsten Grothe
[...]
Post by Mosè Giordano
can help AUCTeX. Maybe ask this feature to the package author?
fhttps://bitbucket.org/cgnieder/exsheets/issues/42/number-of-latex-runs-to-get-totalpoints#comment-36774072
Very good! Once we know the warning issued by the new package xsim,
we can support it. Feel free to ping us again when the package will
be released ;-)

Bye,
Mosè
Thorsten Grothe
2017-06-05 16:27:18 UTC
Permalink
Hi Mosè,

* Mosè Giordano: 14.05.2017 (17:53):

[...]
Post by Mosè Giordano
Very good! Once we know the warning issued by the new package xsim,
we can support it. Feel free to ping us again when the package will
be released ;-)
the new package xsim is on ctan:
https://www.ctan.org/pkg/xsim?lang=de

Regards

Thorsten Grothe
Mosè Giordano
2017-06-13 09:55:14 UTC
Permalink
Hi Thorsten,
Post by Thorsten Grothe
Hi Mosè,
[...]
Post by Mosè Giordano
Very good! Once we know the warning issued by the new package xsim,
we can support it. Feel free to ping us again when the package will
be released ;-)
https://www.ctan.org/pkg/xsim?lang=de
Now AUCTeX suggests to rerun LaTeX when it catches xsim warnings. See commit

* 4d426eac (2017-06-13) Suggest to rerun LaTeX if xsim properties changed

https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=commitdiff;h=4d426eac1664add53e22046911e64d05991ade4a

Bye,
Mosè
Thorsten Grothe
2017-06-13 13:10:46 UTC
Permalink
Hi Mosè,

* Mosè Giordano: 13.06.2017 (09:55):


[...]
Post by Mosè Giordano
Now AUCTeX suggests to rerun LaTeX when it catches xsim warnings. See commit
* 4d426eac (2017-06-13) Suggest to rerun LaTeX if xsim properties changed
https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=commitdiff;h=4d426eac1664add53e22046911e64d05991ade4a
That are great news, thanks for the super fast support!

Regards

Thorsten Grothe

Loading...