GNU bug report logs -
#52872
13.0.15; wrong type argument error on calling ‘LaTeX-xparse-macro-parse’
Previous Next
Reported by: Andrea Greselin <greselin.andrea <at> gmail.com>
Date: Wed, 29 Dec 2021 15:22:02 UTC
Severity: normal
Tags: notabug
Found in version 13.0.15
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52872 in the body.
You can then email your comments to 52872 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 15:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andrea Greselin <greselin.andrea <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Wed, 29 Dec 2021 15:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
after updating to AUCTeX 13.0.15 I started getting a wrong type
argument error on opening certain .tex files. The traceback showed
that the culprit was ‘LaTeX-xparse-macro-parse’ calling
‘replace-regexp-in-string’ with a nil ‘spec’ argument. If I understand
correctly, the function is reading the ‘name’, ‘spec’ and ‘what’ local
variables from the ‘xcmd’ list with an offset wrt to v. 13.0.14. The
attached patch removes the offset and it’s fixed the issue for me.
[Message part 2 (text/html, inline)]
[xparse_patch.txt (text/plain, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 15:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 52872 <at> debbugs.gnu.org (full text, mbox):
Hi Andrea,
Andrea Greselin <greselin.andrea <at> gmail.com> writes:
> after updating to AUCTeX 13.0.15 I started getting a wrong type
> argument error on opening certain .tex files. The traceback showed
> that the culprit was ‘LaTeX-xparse-macro-parse’ calling
> ‘replace-regexp-in-string’ with a nil ‘spec’ argument. If I understand
> correctly, the function is reading the ‘name’, ‘spec’ and ‘what’ local
> variables from the ‘xcmd’ list with an offset wrt to v. 13.0.14. The
> attached patch removes the offset and it’s fixed the issue for me.
Thanks for the report. The way `LaTeX-xparse-macro-parse' works was
changed here[1] where also `LaTeX-xparse-macro-regexp' was adjusted
accordingly. From your report, I suspect you have multiple AUCTeX
installations and the regexp for parsing is coming from an older version
and the function from a newer one. Please restart your Emacs, open your
.tex file and hit `C-h e' and look for the directory from where
xparse.el is loaded. If not loaded, go back to your .tex file, hit `C-c
C-n' and then check again with `C-h e'.
Best, Arash
Footnotes:
[1] http://git.savannah.gnu.org/cgit/auctex.git/commit/style/xparse.el?id=380bc4a2ef1eceb3e8536bc3e0c7ddcc978e63e9
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 16:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Andrea Greselin <greselin.andrea <at> gmail.com> writes:
Hi Andrea,
> after updating to AUCTeX 13.0.15 I started getting a wrong type
> argument error on opening certain .tex files. The traceback showed
> that the culprit was ‘LaTeX-xparse-macro-parse’ calling
> ‘replace-regexp-in-string’ with a nil ‘spec’ argument. If I understand
> correctly, the function is reading the ‘name’, ‘spec’ and ‘what’ local
> variables from the ‘xcmd’ list with an offset wrt to v. 13.0.14. The
> attached patch removes the offset and it’s fixed the issue for me.
Oh, thanks! I've applied your patch which is small enough for not
requiring a copyright assignment. If you plan to contribute more in the
future, feel free to ping me and I'll send you the CA form. :-)
Bye,
Tassilo
Reply sent
to
Tassilo Horn <tsdh <at> gnu.org>
:
You have taken responsibility.
(Wed, 29 Dec 2021 16:59:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andrea Greselin <greselin.andrea <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 29 Dec 2021 16:59:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 17:02:02 GMT)
Full text and
rfc822 format available.
Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
> Thanks for the report. The way `LaTeX-xparse-macro-parse' works was
> changed here[1] where also `LaTeX-xparse-macro-regexp' was adjusted
> accordingly.
Oh, really!? My cursory skimming revealed that (car ...) was replaced
with (nth 1 ...) which seemed to prove Andrea's point and I've applied
his patch before reading your mail. Sorry!
I'm going to revert it now.
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 17:02:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 17:16:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 52872 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all,
the unpatched version doesn’t work for me. I’ve reinstalled
AUCTeX (from Elpa) and restarted the computer to be sure that Emacs
picks up everything as updated. The only mention of xparse.el or .elc
in the Messages buffer is
Loading ~/.emacs.d/elpa/auctex-13.0.15/style/xparse.elc...done
then, towards the end
Sorting xparse-macro...done
Removing duplicates...done
replace-regexp-in-string: Wrong type argument: arrayp, nil
For the sake of completeness,
find ~/.emacs.d/ -name 'xparse.el*'
returns
~/.emacs.d/elpa/auctex-13.0.15/style/xparse.el
~/.emacs.d/elpa/auctex-13.0.15/style/xparse.elc
Could it be because I’m still running TeX Live 2019? I haven’t used
LaTeX in a while...
Andrea
[Message part 2 (text/html, inline)]
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 29 Dec 2021 17:33:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 18:10:01 GMT)
Full text and
rfc822 format available.
Message #30 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Tassilo,
Tassilo Horn <tsdh <at> gnu.org> writes:
>> Thanks for the report. The way `LaTeX-xparse-macro-parse' works was
>> changed here[1] where also `LaTeX-xparse-macro-regexp' was adjusted
>> accordingly.
>
> Oh, really!? My cursory skimming revealed that (car ...) was replaced
> with (nth 1 ...) which seemed to prove Andrea's point and I've applied
> his patch before reading your mail. Sorry!
No problem, I try to figure out the issue with Andrea.
> I'm going to revert it now.
Yes, please.
Thanks, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 18:10:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Wed, 29 Dec 2021 18:10:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 52872 <at> debbugs.gnu.org (full text, mbox):
Andrea Greselin <greselin.andrea <at> gmail.com> writes:
> the unpatched version doesn’t work for me. I’ve reinstalled
> AUCTeX (from Elpa) and restarted the computer to be sure that Emacs
> picks up everything as updated. The only mention of xparse.el or .elc
> in the Messages buffer is
>
> Loading ~/.emacs.d/elpa/auctex-13.0.15/style/xparse.elc...done
>
> then, towards the end
>
> Sorting xparse-macro...done
> Removing duplicates...done
> replace-regexp-in-string: Wrong type argument: arrayp, nil
>
> For the sake of completeness,
>
> find ~/.emacs.d/ -name 'xparse.el*'
>
> returns
>
> ~/.emacs.d/elpa/auctex-13.0.15/style/xparse.el
> ~/.emacs.d/elpa/auctex-13.0.15/style/xparse.elc
Thanks for checking and reporting. The only other source of trouble
which remains is an old parsed info file which AUCTeX loads. I can
imagine in that file, thers is an entry with `LaTeX-add-xparse-macros'
which has outdated signature. Can you please check that as well? You
should see that also in the Message buffer, an entry like this:
Loading /path/to/auto/name-of-your-tex-file.el (source)...done
For checking, this is a small file I assembled:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{xparse}
\NewDocumentCommand \foo { > { \ReverseBoolean } s m }{
\IfBooleanTF #1
{ \DoSomethingWithoutStar {#2} }
{ \DoSomethingWithStar {#2} }
}
\NewDocumentCommand \bar { > { \SplitArgument { 2 } { ; } } m }{
\InternalFunctionOfThreeArguments #1
}
\begin{document}
(insert "\n" (format "%S" (LaTeX-xparse-macro-list)))
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
Save the code above as a .tex file, open it and hit `C-c C-n' twice (to
be sure). Then eval the (insert ...) form and you'll see that the
entries retured have four elements. That said, I can't reproduce what
you describe.
> Could it be because I’m still running TeX Live 2019? I haven’t used
> LaTeX in a while...
No, this is AUCTeX only, your TeXlive installation isn't involved.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Thu, 30 Dec 2021 07:44:11 GMT)
Full text and
rfc822 format available.
Message #39 received at 52872 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> The only other source of trouble which remains is an old parsed info
> file which AUCTeX loads. I can imagine in that file, thers is an entry
> with `LaTeX-add-xparse-macros' which has outdated signature. Can you
> please check that as well? You should see that also in the Message
> buffer, an entry like this:
>
> Loading /path/to/auto/name-of-your-tex-file.el (source)...done
It was the automatically generated files from my personal LaTeX
packages that were causing the issue. I had tried deleting the
documents’ ‘auto’ directory before but I forgot about the ones in my
personal texmf tree. Now I’ve re-generated them and everything works
alright.
> Save the code above as a .tex file, open it and hit `C-c C-n' twice (to
> be sure). Then eval the (insert ...) form and you'll see that the
> entries retured have four elements.
Yes, it inserts
(("\\NewDocumentCommand \\bar { > { \\SplitArgument { 2 } { ; } } m }"
"bar"
" > { \\SplitArgument { 2 } { ; } } m "
"New")
("\\NewDocumentCommand \\foo { > { \\ReverseBoolean } s m }"
"foo"
" > { \\ReverseBoolean } s m "
"New"))
Sorry for wasting your time guys :(
Have a happy new year :-)
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#52872
; Package
auctex
.
(Thu, 30 Dec 2021 20:31:02 GMT)
Full text and
rfc822 format available.
Message #42 received at submit <at> debbugs.gnu.org (full text, mbox):
Andrea Greselin <greselin.andrea <at> gmail.com> writes:
Hi Andrea,
> Sorry for wasting your time guys :(
No problem at all. I'm closing this bug.
> Have a happy new year :-)
Same to you!
Bye,
Tassilo
Reply sent
to
Tassilo Horn <tsdh <at> gnu.org>
:
You have taken responsibility.
(Thu, 30 Dec 2021 20:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andrea Greselin <greselin.andrea <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 30 Dec 2021 20:31:03 GMT)
Full text and
rfc822 format available.
Added tag(s) notabug.
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 02 Jan 2022 19:54:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 31 Jan 2022 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.