Discussion:
[AUCTeX] Japanese LaTeX classes not recognized
jfbu
2017-01-14 15:45:49 UTC
Permalink
Hi,

when I try

\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}

something goes eerie

It is simply that AUCTeX does not support jsbook, jsreport classes ?

(one compiles with platex)

Best

Jean-François
Arash Esbati
2017-01-15 14:08:21 UTC
Permalink
Hi Jean-François,
Post by jfbu
when I try
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}
something goes eerie
It is simply that AUCTeX does not support jsbook, jsreport classes ?
From your screenshot, Emacs sticks in Fundamental mode. Have you
changed `auto-mode-alist' lately? I suggest you do `M-x
toggle-debug-on-error', invoke the error and look what the debugger
says. I can put your code in a new .tex file and have no issues.

Best, Arash
jfbu
2017-01-15 14:43:17 UTC
Permalink
Hi Arash
Post by Arash Esbati
Hi Jean-François,
Post by jfbu
when I try
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}
something goes eerie
It is simply that AUCTeX does not support jsbook, jsreport classes ?
From your screenshot, Emacs sticks in Fundamental mode. Have you
changed `auto-mode-alist' lately? I suggest you do `M-x
toggle-debug-on-error', invoke the error and look what the debugger
says. I can put your code in a new .tex file and have no issues.
I have no issue pasting the contents above in an existing .tex file,
say to replace all its contents. But if I then type C-cC-n all
font locking is done and I end up in Fundamental Mode.

If I kill the buffer and reopen a new one from dired
I get the

File mode specification error: (wrong-type-argument consp nil)

error from my screenshot.

I have not fiddled with auto-mode-alist (I don't paste it here
it is long) and all I find related to it in my init file is
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))

(which by the way is probably unneeded now, dates back to 2014)

here is the report from debug on error. Happens when typing Return
on a selected temp.tex file with the above contents in a dired buffer

Debugger entered--Lisp error: (wrong-type-argument consp nil)
byte-code("\306\307!\210\310\307\311\312#\210\313\314 #\315\316 \"A\317\240\210\315\320 \"A\321\240\210\313\n\322\"\303\323N\204-\324\325\323N\204S\f\326=\203=\327\202Q\f\330=\203G\331\202Q\315\332
\"A@\333\240\210\334\335\323N\204t\313\f\326=\203d\336\202o\f\330=\203n\337\202o\340\"\341\342\343\344\345\346#\206\347\"\210\341\350\343\351\352\353#\206\214\354\"\210\313\355@\"@\356\357\312\360\361\362\363\364&\210\356\365\340\366\361\362\363\367&\210\356\370\340\371\361\362\363\372&\210\356\373\374\375\361\362\363\376&\210\306\373!\210\356\377\201C\201D\361\362\363\376&\210\306\377!\210\356\201E\201F\201G\361\362\363\376&\210\356\201A\201H\201I\361\362\363\201J&\210\313AB\"B\340\207" [japanese-TeX-command-list TeX-command-list TeX-expand-list TeX-view-predicate-list system-type TeX-view-program-list-builtin make-variable-buffer-local japanese-TeX-mode put permanent-local t append (("-" "" ignore nil t)) assoc "BibTeX" "%(bibtex) %s" "Index" "%(makeindex) %s" (("%(kanjiopt)" (lambda nil (if (and (featurep (quote mule)) japanese-TeX-use-kanji-opt-flag) (let ((str ...)) (if str (format " -kanji=%s " str) "")) ""))) ("%(bibtex)" (lambda nil (cond ((eq TeX-engine (quote ptex)) (if (executable-find "pbibtex") "pbibtex %(kanjiopt)" "jbibtex")) ((eq TeX-engine (quote jtex)) "jbibtex") ((eq TeX-engine (quote uptex)) "upbibtex") (t "bibtex")))) ("%(makeindex)" (lambda nil (if (memq TeX-engine (quote (ptex uptex))) "mendex %(mendexkopt)" "makeindex"))) ("%(mendexkopt)" (lambda nil (if (and (featurep (quote mule)) japanese-TeX-use-kanji-opt-flag) (let ((str ...)) (if str (format " -%c " ...) "")) ""))) ("%(xdvi)" (lambda nil (if (and japanese-TeX-mode (executable-find "pxdvi")) "pxdvi" "%(o?)xdvi")))) saved-value ((paper-a4 (TeX-match-style "\\`\\(a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'")) (paper-a5 (TeX-match-style "\\`\\(a5j\\|a5paper\\|a5comb\\)\\'")) (paper-b5 (and (TeX-match-style "\\`b5paper\\'") (not (memq TeX-engine (quote (ptex uptex)))))) (paper-b5jis (or (TeX-match-style "\\`b5j\\'") (and (TeX-match-style "\\`b5paper\\'") (memq TeX-engine (quote (ptex uptex)))))) (paper-b4jis (TeX-match-style "\\`\\(b4j\\|b4paper\\)\\'"))) TeX-view-program-list windows-nt (("TeXworks" "TeXworks %o" "texworks") ("MuPDF" "mupdf %o" "mupdf")) darwin (("TeXShop" "open -a TeXShop.app %o" "open") ("TeXworks" "open -a TeXworks.app %o" "open") ("PictPrinter" "open -a PictPrinter.app %d" "open") ("Mxdvi" "open -a Mxdvi.app %d" "open")) "xdvi" "%(xdvi) -unique" (("TeXworks" "texworks %o" "texworks") ("MuPDF" "mupdf %o" "mupdf")) TeX-view-program-selection ((output-dvi "dviout") (output-pdf "TeXworks")) ((output-pdf "Preview.app")) nil mapc #[(dir) "\301\302\303#\207" [dir add-to-list TeX-macro-global t] 4] TeX-tree-expand ("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") "platex" ("/ptex/" "/pbibtex/bst/") ("/usr/share/texmf/ptex/" "/usr/share/texmf/pbibtex/bst/") #[(dir) "\301\302\303#\207" [dir add-to-list TeX-macro-global t] 4] ("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") "jlatex" ("/jtex/" "/jbibtex/bst/") ("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/") (("\\`u[jt]\\(article\\|report\\|book\\)\\'\\|\\`uplatex\\'" "%(PDF)uplatex %S%(PDFout)") ("\\`[jt]s?\\(article\\|report\\|book\\)\\'" "%(PDF)platex %(kanjiopt)%S%(PDFout)") ("\\`j-\\(article\\|report\\|book\\)\\'" "%(PDF)jlatex %S%(PDFout)")) custom-declare-variable japanese-TeX-error-messages "*If non-nil, explain TeX error messages in Japanese." :group ...] 8)
japanese-latex-mode()
TeX-tex-mode()
apply(TeX-tex-mode nil)
tex-mode()
set-auto-mode-0(tex-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer FOO/temp.tex> "~/FOO/temp.tex" nil nil "~/FOO/temp.tex" (31197844 16777217))
find-file-noselect("/Users/FOO/temp.tex" nil nil nil)
find-file("/Users/FOO/temp.tex")
dired-find-file()
funcall-interactively(dired-find-file)
call-interactively(dired-find-file nil nil)
command-execute(dired-find-file)

Best,
Jean-François
Arash Esbati
2017-01-15 16:57:03 UTC
Permalink
Post by jfbu
I have no issue pasting the contents above in an existing .tex file,
say to replace all its contents. But if I then type C-cC-n all
font locking is done and I end up in Fundamental Mode.
If I kill the buffer and reopen a new one from dired
I get the
File mode specification error: (wrong-type-argument consp nil)
I saved this as testmendex.tex,

--8<---------------cut here---------------start------------->8---
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}

%%% Local Variables:
%%% mode: japanese-latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---

restarted Emacs, did `M-x dired RET', point on file, `RET' and I cannot
reproduce the error.
Post by jfbu
I have not fiddled with auto-mode-alist (I don't paste it here
it is long) and all I find related to it in my init file is
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
Ok, thanks for checking.
Post by jfbu
here is the report from debug on error. Happens when typing Return
on a selected temp.tex file with the above contents in a dired buffer
Debugger entered--Lisp error: (wrong-type-argument consp nil)
byte-code("..."
[japanese-TeX-command-list TeX-command-list TeX-expand-list
...] 8)
japanese-latex-mode()
Thanks. My last idea would be that you have touched one of the
variables mentioned in documentation as obsolete and AUCTeX gets upset
about it:

--8<---------------cut here---------------start------------->8---
The former customize options japanese-TeX-command-default and
japanese-LaTeX-command-default are obsolete. Use
japanese-TeX-engine-default instead. If you need to customize the
executable file name such as ‘"latex"’, the options for them, or both,
customize TeX-engine-alist.

Also, the option japanese-TeX-command-list is considered as
semi-obsolete. It still functions as before, but in theory, it is not
required anymore in normal use.
--8<---------------cut here---------------end--------------->8---

Sorry if the answer is not satisfactory.

Best, Arash
jfbu
2017-01-15 17:49:06 UTC
Permalink
Hi Arash,

thanks for looking into this, as I will not be able to
tell more until tomorrow let me just say about
Post by Arash Esbati
I saved this as testmendex.tex,
--8<---------------cut here---------------start------------->8---
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}
%%% mode: japanese-latex
%%% TeX-master: t
--8<---------------cut here---------------end--------------->8---
restarted Emacs, did `M-x dired RET', point on file, `RET' and I cannot
reproduce the error.
that following exactly the same steps ends up in the error I reported
earlier.

and regarding
Post by Arash Esbati
... My last idea would be that you have touched one of the
variables mentioned in documentation as obsolete and AUCTeX gets upset
--8<---------------cut here---------------start------------->8---
The former customize options japanese-TeX-command-default and
japanese-LaTeX-command-default are obsolete. Use
japanese-TeX-engine-default instead. If you need to customize the
executable file name such as ‘"latex"’, the options for them, or both,
customize TeX-engine-alist.
Also, the option japanese-TeX-command-list is considered as
semi-obsolete. It still functions as before, but in theory, it is not
required anymore in normal use.
--8<---------------cut here---------------end--------------->8---
Sorry if the answer is not satisfactory.
I will check, but I am sure I never configured anything Japanese
knowingly in my Emacs !!

but fwiw my built is a Japanese built, I mention it only to get
everyone more confused:

https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-25.1-mac-6.1
https://bitbucket.org/mituharu/emacs-mac/overview
Mitsuharu Yamamoto committed 892fa7b
2016-10-30

Apologies as I can't go more into this today until tomorrow,

Best wishes

Jean-François
jfbu
2017-01-17 16:59:32 UTC
Permalink
(re-posting this message never seemed to have made it to the list)

Hi Arash,

thanks for looking into this, as I will not be able to
tell more until tomorrow let me just say about
Post by Arash Esbati
I saved this as testmendex.tex,
--8<---------------cut here---------------start------------->8---
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}
%%% mode: japanese-latex
%%% TeX-master: t
--8<---------------cut here---------------end--------------->8---
restarted Emacs, did `M-x dired RET', point on file, `RET' and I cannot
reproduce the error.
that following exactly the same steps ends up in the error I reported
earlier.

and regarding
Post by Arash Esbati
... My last idea would be that you have touched one of the
variables mentioned in documentation as obsolete and AUCTeX gets upset
--8<---------------cut here---------------start------------->8---
The former customize options japanese-TeX-command-default and
japanese-LaTeX-command-default are obsolete. Use
japanese-TeX-engine-default instead. If you need to customize the
executable file name such as ‘"latex"’, the options for them, or both,
customize TeX-engine-alist.
Also, the option japanese-TeX-command-list is considered as
semi-obsolete. It still functions as before, but in theory, it is not
required anymore in normal use.
--8<---------------cut here---------------end--------------->8---
Sorry if the answer is not satisfactory.
I will check, but I am sure I never configured anything Japanese
knowingly in my Emacs !!

but fwiw my built is a Japanese built, I mention it only to get
everyone more confused:

https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-25.1-mac-6.1
https://bitbucket.org/mituharu/emacs-mac/overview
Mitsuharu Yamamoto committed 892fa7b
2016-10-30

Apologies as I can't go more into this today until tomorrow,

Best wishes

Jean-François
jfbu
2017-01-23 13:17:14 UTC
Permalink
Hi Arash
Post by Arash Esbati
Post by jfbu
[...]
File mode specification error: (wrong-type-argument consp nil)
I saved this as testmendex.tex,
--8<---------------cut here---------------start------------->8---
\documentclass{jsbook}
\begin{document}
if only I spoke Japanese!
\end{document}
%%% mode: japanese-latex
%%% TeX-master: t
--8<---------------cut here---------------end--------------->8---
restarted Emacs, did `M-x dired RET', point on file, `RET' and I cannot
reproduce the error.
thanks again for trying out

Indeed on a Ubuntu 16 with

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2016-04-17 on lgw01-04, modified by Debian

I don't have the issue which I reported initially
(tested with 11.89.6 and then 11.90.0)

The issue does arise on my Mac though, (with Emacs 25.1
and a binary build I downloaded from the net)

the first thought is
that something is different in my init files, I can not
compare them now but will do that later and report if
anything comes out.

Jean-François
jfbu
2017-01-24 21:57:50 UTC
Permalink
Hi,

I have made some (surprising) progress on my problem.

I am lacking the Emacs-Lisp knowledge to go much farther
and also some energy now because reaching this was
already non-trivial and time-consuming.

(and today that's the Third important "bug" in software
I have been confronted with)

Please believe me because what I am going to explain
is barely credible.

I mentioned I am using this built:

https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-25.1-mac-6.1

I am not sure if it is related to this or is an intrinsic
behaviour of AucTeX, but all my problems go back to the
fact that I customized TeX-command-list,

(coincidentally it got mentioned in another thread.)

The actual contents of my customization is **not** the cause, the
actual cause seems to be that I have **removed** some stuff...
let me try to clarify

if my custom.el contains for TeX-command-list this:

(which is the start of the default)

'(TeX-command-list
(quote
(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
(plain-tex-mode ams-tex-mode texinfo-mode)
:help "Run plain TeX")
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
(latex-mode doctex-mode)
:help "Run LaTeX")
("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil
(texinfo-mode)
:help "Run Makeinfo with Info output")
("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil
(texinfo-mode)
:help "Run Makeinfo with HTML output")
("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t" TeX-run-TeX nil
(ams-tex-mode)
:help "Run AMSTeX")
("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t" TeX-run-TeX nil
(context-mode)
:help "Run ConTeXt once")
("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t" TeX-run-TeX nil
(context-mode)
:help "Run ConTeXt until completion")
("BibTeX" "%(bibtex) %s" TeX-run-BibTeX nil t :help "Run BibTeX")
("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
("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" :visible TeX-queue-command)
("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help "Generate PostScript file")
("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help "Convert DVI file to PostScript")
("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help "Convert DVI file to PDF with dvipdfmx")
("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help "Convert PostScript file to PDF")
("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file")
)))

then all is fine. But take the exact same except that your remove the last line

("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file")

then, my problem appears. (quit and relaunch Emacs when subtracting; when adding
I only need to do load-file)

In more detail:

with the set-up above up to **and including** the Index line, when
I go and open a buffer on a file using a Japanese class, then,
much to my surprise
(and it is a quite ironical because it all started with me wanting
to learn about Japanese LaTeX classes), the TeX-command-list
actually changes (is this AUCTeX official behaviour ?) and gets more entries:

(which I should have seen years ago but never got too because this process
is broken when I customize TeX-command-list in a certain way)

("jTeX" "%(PDF)jtex %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
(plain-tex-mode)
:help "Run NTT jTeX")
("jLaTeX" "%(PDF)jlatex %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
(latex-mode)
:help "Run NTT jLaTeX")
("pTeX" "%(PDF)ptex %(kanjiopt)%`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
(plain-tex-mode)
:help "Run ASCII pTeX")
("pLaTeX" "%(PDF)platex %(kanjiopt)%`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
(latex-mode)
:help "Run ASCII pLaTeX")
("Mendex" "mendex %(mendexkopt)%s" TeX-run-command nil t :help "Create index file with mendex")
("jBibTeX" "jbibtex %s" TeX-run-BibTeX nil t :help "Run jBibTeX")
("pBibTeX" "pbibtex %(kanjiopt)%s" TeX-run-BibTeX nil t :help "Run pBibTeX")
("-" "" ignore nil t)

which are inserted at start of TeX-command-list

(once this insertion is done it remains in effect in buffers
not using the Japanese class)

If I omit the

("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file")

then this insertion of extra things seemingly does NOT HAPPEN
when I open a buffer on a file like testmendex.tex, and an
error is reported instead.

My own customizations can be all put at end of TeX-command-list
they are not by themselves the cause of the problem
(further I have the exact same customizations
on the Ubuntu thing I mentioned in a previous message, and all
works well there)

The thing is that, to the extent I could determine after a rather
long deduction process, the patch done either by AUCTeX itself
or by the special Emacs build I am using succeeds only under
the above described circumstances: remove Index line, it fails.
Include it, it succeeds, completely independently of the
next entries if there are some in TeX-command-list inside custom.el

To be honest I have not tried to determine the minimal conditions
of success. Perhaps I could remove
some earlier lines, perhaps not, I have no idea. (I tried with
only the Index thing and it failed).

Well, I am condemned it seems to start my TeX-command-list
with the above canonical entries.

This will give me opportunity to freshen a bit my
TeX-command-list entries which got frozen quite some years ago

As long as the above entries are there, I can pile up my own
things and also the old things not mine at end of list without
creating the problem.

Jean-François
jfbu
2017-01-24 22:11:53 UTC
Permalink
Post by jfbu
which are inserted at start of TeX-command-list
(once this insertion is done it remains in effect in buffers
not using the Japanese class)
also TeX-expand-list is modified

(the first expander is mine, the others are inserted
when opening a buffer on a file with a Japanese class)

Value: (("%cS"
(lambda nil "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient --no-wait +%%l %%f"))
("%(kanjiopt)"
(lambda nil
(if
(and
(featurep 'mule)
japanese-TeX-use-kanji-opt-flag)
(let
((str
(japanese-TeX-get-encoding-string)))
(if str
(format " -kanji=%s " str)
""))
"")))
("%(bibtex)"
(lambda nil
(cond
((eq TeX-engine 'ptex)
(if
(executable-find "pbibtex")
"pbibtex %(kanjiopt)" "jbibtex"))
((eq TeX-engine 'jtex)
"jbibtex")
((eq TeX-engine 'uptex)
"upbibtex")
(t "bibtex"))))
("%(makeindex)"
(lambda nil
(if
(memq TeX-engine
'(ptex uptex))
"mendex %(mendexkopt)" "makeindex")))
("%(mendexkopt)"
(lambda nil
(if
(and
(featurep 'mule)
japanese-TeX-use-kanji-opt-flag)
(let
((str
(japanese-TeX-get-encoding-string)))
(if str
(format " -%c "
(upcase
(aref str 0)))
""))
"")))
("%(xdvi)"
(lambda nil
(if
(and japanese-TeX-mode
(executable-find "pxdvi"))
"pxdvi" "%(o?)xdvi"))))

Original value was nil

But perhaps this is all standard AUCTeX behaviour ?

Jean-François
Mosè Giordano
2017-01-25 00:21:50 UTC
Permalink
Hi Jean-François,
Post by jfbu
Hi,
I have made some (surprising) progress on my problem.
I am lacking the Emacs-Lisp knowledge to go much farther
and also some energy now because reaching this was
already non-trivial and time-consuming.
(and today that's the Third important "bug" in software
I have been confronted with)
I hope they weren't all three in AUCTeX ;-)
Post by jfbu
with the set-up above up to **and including** the Index line, when
I go and open a buffer on a file using a Japanese class, then,
much to my surprise
(and it is a quite ironical because it all started with me wanting
to learn about Japanese LaTeX classes), the TeX-command-list
The behavior you described (adding entries to `TeX-command-list') is expected.
Post by jfbu
If I omit the
("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file")
then this insertion of extra things seemingly does NOT HAPPEN
when I open a buffer on a file like testmendex.tex, and an
The problem was that the "BibTeX" and "Index" entries are changed in
tex-jp.el, but this done without checking whether they were actually
there, resulting in the error you spotted. I guess that not many
users *remove* entries from `TeX-command-list', that's why probably
this bug went unnoticed for years. Anyway, that should be fixed now
on git, thanks for reporting it.
Post by jfbu
This will give me opportunity to freshen a bit my
TeX-command-list entries which got frozen quite some years ago
To be honest, changing the value of that variable with customize is a
bit tricky, because you will miss future changes or new entries made
to the default value of that variable (and this was probably the
source of your problem). The best way would be to only *add* custom
entries (for example with `add-to-list').

Bye,
Mosè
jfbu
2017-01-25 08:59:19 UTC
Permalink
Hi Mosè
Post by Arash Esbati
Hi Jean-François,
Post by jfbu
Hi,
...
(and today that's the Third important "bug" in software
I have been confronted with)
I hope they weren't all three in AUCTeX ;-)
no indeed ;-) and problems with AUCTeX most of the time
boil down to my config, hence at least I have a starting
point todebug them...
Post by Arash Esbati
Post by jfbu
....
If I omit the
("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file")
then this insertion of extra things seemingly does NOT HAPPEN
when I open a buffer on a file like testmendex.tex, and an
The problem was that the "BibTeX" and "Index" entries are changed in
tex-jp.el, but this done without checking whether they were actually
there, resulting in the error you spotted. I guess that not many
users *remove* entries from `TeX-command-list', that's why probably
this bug went unnoticed for years. Anyway, that should be fixed now
on git, thanks for reporting it.
ah... I was almost there, but feared the cause was in compiled
custom set-up in the Emacs binary I use; in retrospect I should
have examined tex-jp.el (sounds obvious now...)

I had tried with only "Index" and knew that something additional
was needed for the process to work without error.

Thanks for this as I now know which entries are really needed
(before AUCTeX incorporates your patch available on git repo)
Post by Arash Esbati
Post by jfbu
This will give me opportunity to freshen a bit my
TeX-command-list entries which got frozen quite some years ago
To be honest, changing the value of that variable with customize is a
bit tricky, because you will miss future changes or new entries made
to the default value of that variable (and this was probably the
source of your problem). The best way would be to only *add* custom
entries (for example with `add-to-list').
I am aware of that. But I am uneasy with having my most used
entries relegated to the bottom of the list, where in fact they
don't even show on my 11" screen and I need to move the mouse
down.

I had no use (having no printer) for Print and Queue entries, and
had no use either for BibTeX, Biber, Index, or the Spell-Check, I
don't use AmsTeX nor ConTeXt (I know they show only when needed)
(moreover I more and more use Latexmk, but actually in those cases
I launch compilation process from a Makefile) further I needed my
own customized File or ps2pdf, and often I need to go via
latex+dvipdfmx not on the current file (.dtx) but on a .tex file
associated with it, (and I don't want any additional mark-up to
the .dtx) etc... hence I have plenty of reasons to need to
customize TeX-command-list

(I also needed at some point back in time to fix sync things with
xdvi on mac os or Skim.app (or Okular on Linux), as things were
not working out of the box for me, but I have forgotten the
details).


I had the normal "BibTeX" entry like this

("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX")

but was lacking the "Index" entry.

Was "Biber" not required ? well I will check out by myself.

Thanks for having gotten to the bottom of this,

Best,

Jean-François
Mosè Giordano
2017-01-25 09:08:14 UTC
Permalink
Hi Jean-François,
Post by jfbu
Post by Mosè Giordano
To be honest, changing the value of that variable with customize is a
bit tricky, because you will miss future changes or new entries made
to the default value of that variable (and this was probably the
source of your problem). The best way would be to only *add* custom
entries (for example with `add-to-list').
I am aware of that. But I am uneasy with having my most used
entries relegated to the bottom of the list, where in fact they
don't even show on my 11" screen and I need to move the mouse
down.
Ever considered using a completion package like helm?

In addition, are you aware of the fact that C-c C-a automatically runs
the TeX compiler, makeindex and the bibliography engine (bibtex/biber)
as appropriate until the document is ready and if compilation succeeds
automatically opens the viewer?
Post by jfbu
Was "Biber" not required ? well I will check out by myself.
No, tex-jp.el doesn't change the entry for biber (maybe because biber
is already utf-8-friendly and doesn't need special treatment).

Bye,
Mosè
Joost Kremers
2017-01-25 09:29:12 UTC
Permalink
Post by Mosè Giordano
Post by jfbu
I am aware of that. But I am uneasy with having my most used
entries relegated to the bottom of the list, where in fact they
don't even show on my 11" screen and I need to move the mouse
down.
Ever considered using a completion package like helm?
While I would second that recommendation (and would throw ivy in
as an alternative to helm ;-), TAB completion also works without a
separate package. If the correct option isn't already selected as
default (which it often is), then typing just the first (few)
letter(s), optionally followed by TAB, gets you the option you
want as well.
--
Joost Kremers
Life has its moments
jfbu
2017-01-25 10:05:29 UTC
Permalink
Hi Joost,
Post by Mosè Giordano
Post by jfbu
I am aware of that. But I am uneasy with having my most used
entries relegated to the bottom of the list, where in fact they
don't even show on my 11" screen and I need to move the mouse
down.
Ever considered using a completion package like helm?
While I would second that recommendation (and would throw ivy in as an alternative to helm ;-), TAB completion also works without a separate package. If the correct option isn't already selected as default (which it often is), then typing just the first (few) letter(s), optionally followed by TAB, gets you the option you want as well.
Thanks for the tip. I am aware of it, and actually tried in my
custom entries to use distinctive initials, but as mentioned
in other message I am much in the habit to use this feature
only for the already pre-existing "official" entries,

I also like to see visually my custom entries so that I don't
forget how they look like.

Also I very often change the compilation engine for the
same source and I do this from the menu although sometimes
I do use File variables, and I update there and C-cC-n

Best

Jean-François
jfbu
2017-01-25 10:01:34 UTC
Permalink
Post by Arash Esbati
Hi Jean-François,
Post by jfbu
Post by Mosè Giordano
To be honest, changing the value of that variable with customize is a
bit tricky, because you will miss future changes or new entries made
to the default value of that variable (and this was probably the
source of your problem). The best way would be to only *add* custom
entries (for example with `add-to-list').
I am aware of that. But I am uneasy with having my most used
entries relegated to the bottom of the list, where in fact they
don't even show on my 11" screen and I need to move the mouse
down.
Ever considered using a completion package like helm?
I am aware that on C-cC-c auto-completion already works,
but I took the habit to use that only on the "official" Entries,
not my own additions ...
Post by Arash Esbati
In addition, are you aware of the fact that C-c C-a automatically runs
the TeX compiler, makeindex and the bibliography engine (bibtex/biber)
as appropriate until the document is ready and if compilation succeeds
automatically opens the viewer?
Yes, I noticed appearance of C-cC-a functionality. Just allow for a
few more years so that I can teach my fingers out of C-cC-c ;-)

And in fact as already hinted above, I am (certainly a minority) of
the kind who manages bibliography entries myself manually and I never
compile any Index, because I do not write books in LaTeX but papers.

And regarding documentation of LaTeX packages, indices are mostly
useless when you have the search function of the pdf viewer, except
on rare occasion with very big documents like the LaTeX source code
where you are looking for things like "in@" perhaps.

Things is different of course for print-outs.
Post by Arash Esbati
Post by jfbu
Was "Biber" not required ? well I will check out by myself.
No, tex-jp.el doesn't change the entry for biber (maybe because biber
is already utf-8-friendly and doesn't need special treatment).
Indeed, as you said initially only "BibTeX" and "Index".

Off-topic:

1) Thunderbird tells me you sent the message also to my address
but somehow I do not see it arriving in my mailbox (I got the one
from Joost), and I also never got your initial answer, I only
saw it on the newsgroup.

2) why the two entries

("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help "Generate PostScript file")
("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help "Convert DVI file to PostScript")

I see "File" gives user a chance to modify it, but why would dvips
have such a variant but not other types of commands ?

3) just for the curious among the things I needed to add to the
TeX-command-list are entries to open in view-mode the log, aux, and
toc files, and to deactivate Flyspell there. (don't recall why)

I also needed entries for dvipng's, and for various other things

I don't need any of ChkTeX or whatever which implements this
normalization spirit of LaTeX I dislike a lot.

etc...

Best,
Jean-François
jfbu
2017-01-25 13:58:28 UTC
Permalink
Post by Mosè Giordano
The problem was that the "BibTeX" and "Index" entries are changed in
tex-jp.el, but this done without checking whether they were actually
Just to say on my Ubuntu thing I didn't have exact same custom.el
and I had retained the "BibTeX" and "Index" entries.

And they may be located even at end of the list.

Best,

Jean-François

Loading...