Subject: bug#49036: The Glossaries command of auctex runs makeglossaries file.aux, but should makeglossaries file

From: Ikumi Keita <[email-masked]>
Date: Tue, 15 Jun 2021 22:56:14 +0900

Hi Vladimir,

>>>>> Vladimir Nikishkin <[email-masked]> writes:
> This does not seem to be correct, as the correct command is
> `makeglossaries acmsmall-format`, not `acmsmall-format.aux`.

Sorry for trouble. It seems that we have clobbered the format of the
argument for makeglossaries. Could you test if the attached patch fixes
the problem, if possible?

Regards,
Ikumi Keita

diff --git a/tex.el b/tex.el
index 917678c7..777aaf56 100644
--- a/tex.el
+++ b/tex.el
@@ -218,7 +218,7 @@ If nil, none is specified."
     ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil
      (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode)
      :help "Convert PostScript file to PDF")
-    ("Glossaries" "makeglossaries %(O?aux)" TeX-run-command nil
+    ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command nil
      (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode)
      :help "Run makeglossaries to create glossary file")
     ("Index" "makeindex %(O?idx)" TeX-run-index nil
@@ -557,6 +557,7 @@ string."
     ("%(extraopts)" (lambda () TeX-command-extra-options))
     ("%(output-dir)" TeX--output-dir-arg "--output-directory=")
     ("%(o-dir)" TeX--output-dir-arg "-o ")
+    ("%(d-dir)" TeX--output-dir-arg "-d ")
     ("%S" TeX-source-correlate-expand-options)
     ("%dS" TeX-source-specials-view-expand-options)
     ("%cS" TeX-source-specials-view-expand-client)