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 #14 received at 71777 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 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 15:39:35 +0300
> Date: Tue, 25 Jun 2024 19:53:59 +0200
> From: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
> 
> I have this string expression in latex-mode:
> 
> $K(U_1, V_1, x_1; t_2, x_2)$
> 
> If the pointer is located on the opened "(" and I run "forward-sexp" it 
> works and the
> pointer goes after the closed ")".
> 
> But if, again, the pointer is located on the opened "(" and I evaluate
> "(sexp-at-point)" it returns nil.
> 
> If I remove the ";" symbol from the expression it works and returns the 
> sexp-at-point:
> 
> $K(U_1, V_1, x_1 t_2, x_2)$
> 
> Is it a bug?

I don't think it's a bug.  forward-sexp moves across balanced
expressions, so it is not specific to Lisp.  By contrast,
sexp-at-point is specific to Lisp and Lisp-like syntax, and so it uses
the buffer's syntax.  Which is why ';' affects the result.

Adding Stefan in case he has comments for this.




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.