GNU bug report logs - #49080
28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced

Previous Next

Package: emacs;

Reported by: Ahmed Khaled <akregeb <at> gmail.com>

Date: Thu, 17 Jun 2021 23:20:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ahmed Khaled <akregeb <at> gmail.com>
Cc: 49080 <at> debbugs.gnu.org
Subject: Re: bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced
 parens) when parens are balanced
Date: Sat, 19 Jun 2021 15:32:32 +0200
Ahmed Khaled <akregeb <at> gmail.com> writes:

> In tex-mode, latex-forward-sexp does not correctly handle parentheses
> like this \[ \]. In particular, it says the expression is not balanced
> when it is.
>
> Steps to reproduce the bug:
> 1. Start with emacs -Q (with -nw or without doesn't make a difference)
> 2. Open any .tex file (I attached test.tex which I used).
> 3. Navigate to any LaTeX equation delimited by \[ and \], like this:
> \[ 1 + 1 = 2 \]
> 4. Put the cursor on the first [ in the line:
> 5. Call latex-forward-sexp
>
> That's it. On test.tex, the error I get is:
>        Scan error: "Unbalanced parentheses", 126, 157
> Note that if the cursor is on the backslash, rather than [, then there
> is no error.

I think that's correct behaviour?  The parentheses start is \[ and not
just [.

Anybody have any opinion here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.