1

The following error appears every other time that a .tex file is opened:

Wrong number of arguments, setq, 3

Enabling toggle-debug-on-error gives this backtrace.

How to go about debugging this? I've tagged this as related to AUCTeX, since it seems to only happen for .tex files.

Below is some information on the installed versions of Aquamacs and AUCTeX. It appears that AUCTeX is the latest version.

Emacs  : Aquamacs 3.3dev  GNU Emacs 25.1.1 (x86_64-apple-darwin14.1.0, NS appkit-1344.72 Version 10.10.2 (Build 14C109))
 of 2016-09-10 on d897b997d8d0ed9db56ce9d1afc679b9a3f1e2fd
Package: 11.89

current state:
==============
(setq
 AUCTeX-date "2015-11-13"
 window-system 'ns
 LaTeX-version "2e"
 TeX-style-path '("/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/var/auctex"
                  "/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex/style"
                  "/Users/mpf/Library/Preferences/Aquamacs Emacs/Packages/auctex/auto"
                  "/Users/mpf/Library/Preferences/Aquamacs Emacs/Packages/auctex/style" "auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 TeX-command-list '(("LatexMk" "latexmk %(-PDF)%S%(mode) %(file-line-error) %(extraopts) %t" TeX-run-latexmk nil
                     (plain-tex-mode latex-mode doctex-mode) :help "Run LatexMk")
                    ("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")
                    ("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")
                    ("Xindy" "texindy %s" TeX-run-command nil t :help "Run xindy to create index file")
                    ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness")
                    ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) :help
                     "Check LaTeX file for common mistakes")
                    ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document")
                    ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files")
                    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
                     "Delete generated intermediate and output files")
                    ("Other" "" TeX-run-command t t :help "Run an arbitrary command")
                    ("Jump to PDF" "%V" TeX-run-discard-or-function nil t :help "Run Viewer"))
 )
  • Please edit your question and post the Lisp section of code dealing with (setq TeX-complete-list . . .) so that we can suggest a modification to eliminate the error. It is inside your user-customization file (somewhere). You have byte-compiled that file and it makes it difficult to eyeball the problem. It looks like you have something problematic that is attached to the find-file-hook. – lawlist Oct 13 '16 at 23:51
  • I ran grep on all of my list customization files: TeX-complete-list doesn't show up anywhere. Is there a way to find where it's used? – Michael Oct 14 '16 at 0:00
  • Then, my best guess is that something went wrong when installing AUCTeX -- perhaps a byte-compile error. An AUCTeX maven should be along shortly ... hang-tight until then. :) – lawlist Oct 14 '16 at 0:21
  • Which version of AUCTeX do you have? we had such a problem some time ago, which is due to a change in the syntax of setq in Emacs 25: lists.gnu.org/archive/html/bug-auctex/2016-01/msg00013.html – giordano Oct 14 '16 at 6:02
  • For what it may be worth, you can do just about anything in the generic Emacs as you can with Aquamacs. The only major difference is the native spellchecker, and there is even a patch of the C-source code that is available if you want to build your own Emacs from source. Here is the link to the latest Emacs 25 generic version for OSX: emacsformacosx.com If you use the generic version, everyone here will be able to help you with your Emacs questions. If you stick with Aquamacs, there will only be a handful of people who have that installed. – lawlist Oct 14 '16 at 21:00
3

You're probably using an old version of AUCTeX, which had indeed the bug you're reporting: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22417 This was due to an error in the style/subfigure.el file in AUCTeX code and it was raised by a change in the syntax of setq in Emacs 25 (now setq takes an even number of arguments).

If you installed AUCTeX using the Emacs's built-in package manager (by far the best way to install it), you only have to update it (you should get version 11.89.5).

  • It appears that AUCTeX 11.89.5 is installed. At least this is the message that I obtain when I run package-reinstall and select AUCTeX. I've added version info to my original post. The bug persists with the reinstall. – Michael Oct 14 '16 at 20:38
  • AUCTeX is "2015-11-13", that is not the date of version 11.89.5. I'd say you have another installation that is shadowing the elpa package. – giordano Oct 14 '16 at 21:29
  • I don't use aquamacs, but it's possible that the version of AUCTeX embedded in the program is shadowing the elpa one. I don't know how to fix this, though. – giordano Oct 14 '16 at 23:07
  • Many thanks for the input. But given @lawlist's suggestion above, I've decided to move to emacsformacosx. What is the protocol for giving up on an answer? Shall I accept this one? – Michael Oct 15 '16 at 0:01
  • If the bug you're experiencing has indeed been fixed as giordano indicates, then yes, I think you should accept this answer. The issues installing the correct package to your configuration seem tangential. – phils Oct 15 '16 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.