GNU bug report logs - #71777
29.4; sexp-at-point in latex-mode when sexp contains ";"

Previous Next

Package: emacs;

Reported by: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>

Date: Tue, 25 Jun 2024 20:41:02 UTC

Severity: normal

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71777 <at> debbugs.gnu.org
Subject: Re: bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains
 ";"
Date: Wed, 26 Jun 2024 22:40:17 +0200
[Message part 1 (text/plain, inline)]
Il 26/06/24 22:25, Stefan Monnier ha scritto:
> Note that "test if a parenthesis in LaTeX (latex-mode) starts a balanced
> expression" is a kind of weird request, because it will only return nil
> if there's a missing close-paren but not if there are too many
> close-parens, i.e. it only detects one half of the imbalances.
>
>
>          Stefan
For my purposes it is enough.

I need to write a function to interactively resize mathematical 
parentheses based on their content, such as "\left( ... \right)". So 
far, I have successfully used `sexp-at-point`, but this function does 
not recognize balanced expressions that contain ";" and only works with 
"(" and "[" but not with < etc..

The `forward-sexp` function does not necessarily give an error if the 
parenthesis does not start a balanced expression. E.g.

$( x + y ]$

here "(" does not start a balanced expression but `forward-sexp` does 
not return an error.

Gabriele
[Message part 2 (text/html, inline)]

This bug report was last modified 331 days ago.

Previous Next


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