GNU bug report logs - #19281
11.86; environment update fails when environment name contains \

Previous Next

Package: auctex;

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


Message #19 received at 19281 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Manuel Sorge <manuel.sorge <at> tu-berlin.de>, 19281 <19281 <at> debbugs.gnu.org>
Subject: Re: bug#19281: 11.86; environment update fails when environment name
 contains \
Date: Wed, 10 Dec 2014 00:17:57 +0100
[Message part 1 (text/plain, inline)]
Hi Tassilo,

2014-12-09 10:34 GMT+01:00 Tassilo Horn <tsdh <at> gnu.org>:
>> 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.

Good idea, except that `LaTeX-find-matching-end' fails to find the
closing brace of \end when the environment name is a macro with
arguments.  The attached patch should fix this problem.
`LaTeX-environment-name-regexp' needs to be a function because if it
were a variable it would always keep the original value, also in
buffers with different values for `TeX-grop' and `TeX-grcl' (or not?).
Probably `LaTeX-modify-environment' can be simplified following your
suggestion, the patch sketches an idea how to fix
`LaTeX-find-matching-end', but can be improved.

Bye,
Mosè
[latex-modify-environment.patch (text/x-diff, attachment)]

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.