Hi Alad and David, >>>>> David Kastrup <[email protected]> writes: > Alad Wenter <[email protected]> writes: >> >> I have installed AUCTeX on emacs-25.2-x86_64, emacs-25-x86_64-deps and >> Windows 7 using GNU ELPA. (I don't use emacs 25.3 due to a DLL issue: [1]) >> >> When trying to Generate previews, I get a "Symbol's function definition is >> void: nil" error. I've set the TeX engine to luatex with the TeX-engine-set >> command. >> >> Toggling debug-on-error results in the following output: (I replaced the >> file names with ## in the output) >> >> Debugger entered--Lisp error: (void-function nil) >> nil(nil t) >> apply(nil (nil t)) >> (concat (and (stringp TeX-command-pos) TeX-command-pos) (apply (function >> nil) args) (and (stringp TeX-command-pos) TeX-command-pos)) >> (shell-quote-argument (concat (and (stringp TeX-command-pos) >> TeX-command-pos) (apply (function nil) args) (and (stringp TeX-command-pos) >> TeX-command-pos))) >> (lambda (&rest args) (shell-quote-argument (concat (and (stringp >> TeX-command-pos) TeX-command-pos) (apply (function nil) args) (and (stringp >> TeX-command-pos) TeX-command-pos))))(nil t) >> apply((lambda (&rest args) (shell-quote-argument (concat (and (stringp >> TeX-command-pos) TeX-command-pos) (apply (function nil) args) (and (stringp >> TeX-command-pos) TeX-command-pos)))) (nil t)) >> TeX-command-expand("%(latex)" nil) >> TeX-inline-preview-internal("lualatex --jobname=\"_region_\" >> -file-line-error >> \"\\nonstopmode\\nofiles\\PassOptionsToPackage{active,tightpage,auctex}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined\\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\\fi}\" >> \"\\input\" \"_region_.tex\"" "_region_" (TeX-region-file . "_region_") >> #<buffer ##.tex> ("##" "lualatex -ini -interaction=nonstopmode \"&lualatex\" >> \"prv_##\".ini >> \"\\nonstopmode\\nofiles\\PassOptionsToPackage{active,tightpage,auctex}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined\\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\\fi}\" >> \"\\input\" \"##.tex\"" . #<overlay from 1 to 55 in ##.tex>) "##" ((lambda >> nil (/ 10.2 (preview-document-pt))) (72.05673758865248 . 71.88679245283019) >> [nil nil nil nil])) >> preview-generate-preview(t "_region_" "lualatex --jobname=\"_region_\" >> -file-line-error >> \"\\nonstopmode\\nofiles\\PassOptionsToPackage{active,tightpage,auctex}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined\\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\\fi}\" >> \"\\input\" \"_region_.tex\"") >> preview-region(1 9393) >> preview-at-point() >> funcall-interactively(preview-at-point) >> call-interactively(preview-at-point nil nil) >> command-execute(preview-at-point) >> >> My .emacs file: >> >> ;; Added by Package.el. This must come before configurations of >> ;; installed packages. Don't delete this line. If you don't want it, >> ;; just comment it out by adding a semicolon to the start of the line. >> ;; You may delete these explanatory comments. >> (package-initialize) >> >> (put 'downcase-region 'disabled nil) >> (put 'dired-find-alternate-file 'disabled nil) >> (custom-set-variables >> ;; custom-set-variables was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> '(package-selected-packages (quote (ada-mode auctex)))) >> (custom-set-faces >> ;; custom-set-faces was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> ) >> >> My .emacs.d folder is empty apart from elpa, auto-save-list and a bookarks >> file. I have no other packages installed apart from AUCTeX. How can I >> troubleshoot this issue? >> >> Best, >> Alad >> >> [1] >> http://gnu.emacs.help.narkive.com/4kg9yq1P/unable-to-run-64-bit-gnu-emacs-25-3-on-windows-7-professional-service-pack-1
> Looks to me like > commit 370a4b92155aebf3d0860c1211617d14d8e7951c > Author: Ikumi Keita <[email protected]> > Date: Fri May 26 22:29:59 2017 +0900 > Resolve preview-latex incompatibility with Japanese TeX (Bug#25322) > [...] > is responsible here. It adds the line > (TeX-command-expand "%(latex)" nil))))) > which is an invalid use of TeX-command-expand (I have no idea how this > could have ever worked). I'm sorry, this is my fault. I'll make out some work around. David, thank you for tracking down this defect. > I have no idea what the intent of that line ever was. "nil" probably > needs to be some file expansion function. The idea is that putting back the "--kanji" option dropped by the preceding regular expression `preview-undump-replacements'. This option is necessary to tell the coding system of the file to the Japanese platex command. I should have noticed the existence of "%s" in the fourth element of the `luatex' entry of `TeX-engine-alist-builtin'. I faltly assumed that this `TeX-command-expand' does not make use of its `file' argument when its first argument is only "%(latex)". But it is wrong for lualatex because of that "%s". It is rather strange that preview-latex does work for lualatex file without error on my machine, but it's not important, of course. Anyway, I'll fix this issue. Regards, Ikumi Keita _______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
