"Samuel W. Flint" <m...@samuelwflint.com> writes: > I've started using the kaohandt class [1] recently, and I have > TeX-parse-self and TeX-auto-save set to t. > > When AucTeX tries to parse the files "kaobook.cls", "kaohandt.cls", and > "kao.sty", I get the following error (file names slightly edited): > >> Debugger entered--Lisp error: (wrong-type-argument arrayp nil) >> replace-regexp-in-string("[ \11\15\n%]" "" nil) >> LaTeX-xparse-macro-parse(mac) >> LaTeX-xparse-auto-cleanup() >> TeX-auto-parse() >> TeX-update-style(t) >> #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_118>() >> run-hooks(find-file-hook) >> after-find-file(nil t) >> find-file-noselect-1(#<buffer kaobook.cls> >> "~/texmf/tex/latex/kaobook/kaobook.cls" nil nil >> "~/texmf/tex/latex/kaobook/kaobook.cls" (12617789 39)) >> #<subr find-file-noselect>("~/texmf/tex/latex/kaobook/kaobook.cls" nil nil >> nil) >> [...] > > I feel a bit out of my depth in debugging this issue, but it is > preventing use of reftex features (reftex-reference in particular).
Thanks for the report. You can reproduce the error by putting these 2 forms in the scratch buffer and eval them (i.e., put the cursor after the closing parenthesis and hit 'C-x C-e'): (replace-regexp-in-string "[ \t\r\n%]" "" "Samuel W. % Flint") => "SamuelW.Flint" (replace-regexp-in-string "[ \t\r\n%]" "" nil) => Debugger entered--Lisp error: (wrong-type-argument arrayp nil) replace-regexp-in-string("[ \11\15\n%]" "" nil) (progn (replace-regexp-in-string "[ \11\15\n%]" "" nil)) The part I don't understand is how that nil is passed as 3rd argument to `replace-regexp-in-string'. > I am using AucTeX b18e98cbec, built from source. I can provide more > information about my configuration as needed. It would be great if you could come up with a recipe to reproduce the error starting with "emacs -Q", that would help finding the root cause. > Thanks for all the work on AucTeX! You're welcome. Best, Arash