GNU bug report logs -
#19281
11.86; environment update fails when environment name contains \
Previous Next
Reported by: Manuel Sorge <manuel.sorge <at> tu-berlin.de>
Date: Fri, 5 Dec 2014 17:38:03 UTC
Severity: normal
Tags: confirmed
Found in version 11.86
Done: Mosè Giordano <mose <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Mosè Giordano <mose <at> gnu.org> writes:
>> I tried to update an environment in a latex document via C-u C-c C-e
>> or LaTeX-modify-environment but mistyped the name as 'theorem\'. I
>> tried to correct my error via C-u C-c C-e again but I got a search
>> failed message:
>>
>> LaTeX-modify-environment: Search failed: "\\\\end{ *\\([a-zA-Z*]*\\)}"
>
> I can confirm the bug you reported. Indeed, `\begin' and `\end'
> accept as valid environment names macros (not your case though) and
> macros with arguments,
Oh, indeed.
> while `LaTeX-modify-environment' searches for names matching
> "[a-zA-Z*]". So, I'm not sure how to fix it: Just add `TeX-esc' to
> the regexp?
That and TeX-grop, TeX-grcl, and [] for optional args, no?
> Or matching everything between the opening and the closing brace
> (allowing at least one level of braces)?
Either that, or we could also rely on syntax tables. I.e., since
`LaTeX-find-matching-end' already brings us to the end of the
environment name,
(let ((end (point)))
(forward-char)
(backward-sexp)
(forward-char)
(buffer-substring-no-properties (point) end))
gives us the environment name.
Bye,
Tassilo
This bug report was last modified 10 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.