Hi Arash, >>>>> Ikumi Keita <[email protected]> writes: >>> 3. The document states that Texinfo mode can run texindex through >>> "Index" entry in `TeX-command-list', but "Index" actually runs >>> makeindex, not texindex. No entry in `TeX-command-list' runs texindex. >>> Should we add a new entry in `TeX-command-list' to run texindex? >>> (It seems to me more useful for users to enable running texi2pdf than >>> just texindex, so I suppose that it should be such entry rather than >>> texindex entry that is to be added.)
>> My preferred option would be to have 2 entries for texindex and >> texi2pdf. For me, I never managed to get texi2pdf working on my Windows >> box, so my current workflow is run pdftex on a file.texi, run texindex >> on file.?? and run pdftex again. But maybe that makes also sense for >> users who have a working setup. >> WDYT? > I see. I'll do that when I feel like it. :-) I made up a tentative fix and additional patch as attachments below. What do you think about them? Regards, Ikumi Keita
>From f16fc130a8cfb21b9710ebc8cdadb4dbc05353c2 Mon Sep 17 00:00:00 2001 From: Ikumi Keita <[email protected]> Date: Wed, 7 Jul 2021 18:06:02 +0900 Subject: [PATCH 1/2] Add entries for Texinfo mode in `TeX-command-list' * tex.el (TeX-command-list): Add "Texindex" and "Texi2dvi" entries in `TeX-command-list'. * doc/auctex.texi (Superseding): Mention "Texindex" instead of "Index". --- doc/auctex.texi | 4 +--- tex.el | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index 7459ab6e..c5d36ff8 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -5973,10 +5973,8 @@ The native Texinfo mode provides the binding @kbd{C-c C-t C-i} @kbd{C-c C-t C-p} (@code{texinfo-tex-print}) and @kbd{C-c C-t C-q} (@code{tex-show-print-queue}) for printing and showing the printer queue. These are superseded by the respective commands available -through @kbd{C-c C-c} (@code{TeX-command-master}) in @AUCTeX{}: @samp{Index}, +through @kbd{C-c C-c} (@code{TeX-command-master}) in @AUCTeX{}: @samp{Texindex}, @samp{Print}, and @samp{Queue}. -@c FIXME: "Index" runs makeindex, not texindex. No entry in -@c TeX-command-list runs texindex. @item Kill jobs The command @kbd{C-c C-t C-k} (@code{tex-kill-job}) in the native mode diff --git a/tex.el b/tex.el index 2c5da746..df467de2 100644 --- a/tex.el +++ b/tex.el @@ -202,6 +202,17 @@ If nil, none is specified." ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run Biber") + ;; Not part of standard TeX. + ;; It seems that texindex doesn't support "--output-dir" option. + ("Texindex" "texindex %s.??" TeX-run-command nil + (texinfo-mode) :help "Run Texindex") + ;; TODO: + ;; 1. Supply "--dvipdf" option if `TeX-PDF-mode' and + ;; `TeX-PDF-from-DVI' are non-nil. + ;; 2. Supply "--build-dir=DIR" option when `TeX-output-dir' is + ;; non-nil. + ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil + (texinfo-mode) :help "Run Texi2dvi or Texi2pdf") ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" -- 2.31.1
>From 41610c721c90b9e466e660b98de968519e78a9b4 Mon Sep 17 00:00:00 2001 From: Ikumi Keita <[email protected]> Date: Wed, 7 Jul 2021 18:59:48 +0900 Subject: [PATCH 2/2] Add index files as clean target in Texinfo mode * tex-info.el (Texinfo-clean-intermediate-suffixes): Add index file suffixes. --- tex-info.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tex-info.el b/tex-info.el index 4a7aed08..ef1e4397 100644 --- a/tex-info.el +++ b/tex-info.el @@ -867,7 +867,8 @@ value of `Texinfo-mode-hook'." (run-mode-hooks 'text-mode-hook 'Texinfo-mode-hook) (TeX-set-mode-name)) -(defcustom Texinfo-clean-intermediate-suffixes nil +(defcustom Texinfo-clean-intermediate-suffixes + '("\\.cps?" "\\.vrs?" "\\.fns?" "\\.tps?" "\\.pgs?" "\\.kys?") "List of regexps matching suffixes of files to be deleted. The regexps will be anchored at the end of the file name to be matched, i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." -- 2.31.1
