Many thanks Arash, AUCTeX version is 12.2
AUCTeX, emacs and the whole texmf were installed via apt install I evaluated the code in scratch, or I think so: M+: and the code, no line breaks. The minibuffer returned nil. I opened a *.tex file with a TeX-master in local variables. However the full AUCTeX bundle for LaTeX files was not available in the major mode. Instead, the default TeX environment that is loaded with 'emacs -Q filename.tex' was available. As if the eval code did not activate AUCTeX actually. As a result C-c C-e did not launch an environment. Best, On Mon, Nov 13, 2023 at 8:14 PM Arash Esbati <ar...@gnu.org> wrote: > Jose Maria Martin Olalla <ola...@us.es> writes: > > > I am using emacs GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ > > Version 3.24.37, cairo version 1.16.0) on Debian 12 with AucTeX to > > edit LaTeX2e documents. > > Which version of AUCTeX are you using, and how did you install it? > > > If the variable master-file is not set, ie when the file is the > > master-file, then upon inserting an equation C-c C-e the reftex mode > > correctly inserts the appropriate label \label{eq:NUM}. > > > > However, if the master-file variable is set the following message > > appears > > > > LaTeX-label: Wrong type argument: symbolp, #[128 " \"" [apply > > reftex-label reftex-label nil] 4 nil (advice-eval-interactive-spec > > (cadr (interactive-form 'reftex-label)))] > > Can you come up with a recipe to reproduce this issue starting with > emacs -Q? So something like: > > • emacs -Q > • eval in scratch: > (progn > (package-initialize t) > (package-activate 'auctex)) > • Open a .tex file with TeX-master in local variables > • M-x reftex-mode RET > • M-x toggle-debug-on-error > • C-c C-e equation RET > > And the see what happens. > > Best, Arash > -- José María Martín Olalla ---------- Profesor Titular Departamento de Física de la Materia Condensada Universidad de Sevilla +349545-56075 Twitter: https://twitter.com/MartinOlalla_JM ResearchID: M-3265-2014 <http://www.researcherid.com/rid/M-3265-2014> ORCID: https://orcid.org/0000-0002-3750-9113 Repositorio institucional: https://idus.us.es/author-profiles/author?id=2522