all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Gabriele Nicolardi <gabriele@medialab.sissa.it>, 71777@debbugs.gnu.org
Subject: bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";"
Date: Wed, 26 Jun 2024 09:46:59 -0400	[thread overview]
Message-ID: <jwvo77nzv42.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86v81v98u0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Jun 2024 15:39:35 +0300")

>> $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.

AFAICT, `sexp-at-point` correctly finds the parenthesized thingy, but it
is asked to return the Lisp object it represents rather than a string,
so it `read`s, which inevitably obeys the ELisp syntax.

IOW, I suspect you want (thing-at-point 'sexp) rather than
(sexp-at-point).


        Stefan






  reply	other threads:[~2024-06-26 13:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 17:53 bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";" Gabriele Nicolardi
2024-06-25 21:52 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-25 22:51   ` Gabriele Nicolardi
2024-06-26 12:39 ` bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains "; " Eli Zaretskii
2024-06-26 13:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-26 15:52     ` bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";" Gabriele Nicolardi
2024-06-26 20:11       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 20:18         ` Gabriele Nicolardi
2024-06-26 20:25           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 20:40             ` Gabriele Nicolardi
2024-06-26 21:04               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 21:14                 ` Gabriele Nicolardi
2024-06-26 21:26                 ` Gabriele Nicolardi
2024-06-26 22:19                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-27  6:01                     ` Gabriele Nicolardi
2024-06-29 12:25                       ` Eli Zaretskii
2024-06-26 19:43     ` Gabriele Nicolardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvo77nzv42.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71777@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gabriele@medialab.sissa.it \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.