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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71777 <at> debbugs.gnu.org
Subject: bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";"
Date: Wed, 26 Jun 2024 16:11:41 -0400
> I need to test if a parenthesis in LaTeX (latex-mode) starts
> a balanced expression.

You mentioned `forward-sexp` which should do the trick, so what made you
try `sexp-at-point`?

> sexp-at-point: Return the sexp at point, or nil if none is found.
>
> This is not possible with (thing-at-point 'sexp) because it does no return nil in the case, e.g.:
>
> $K(U_1, V_1, x_1; t_2, x_2$

The "<foo>-at-point" functions (by the very nature of the concept of
"foo at point") are DWIMish functions.
They're usually not appropriate for use from ELisp code unless that
ELisp code itself wants to be DWIMish.


        Stefan





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.