unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, 71777@debbugs.gnu.org
Subject: bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";"
Date: Wed, 26 Jun 2024 22:40:17 +0200	[thread overview]
Message-ID: <dc7c6a65-f7dd-44e6-9fd2-45fb12519c09@medialab.sissa.it> (raw)
In-Reply-To: <jwvzfr7xxpf.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1297 bytes --]

  reply	other threads:[~2024-06-26 20:40 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   ` bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";" Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26 15:52     ` 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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=dc7c6a65-f7dd-44e6-9fd2-45fb12519c09@medialab.sissa.it \
    --to=gabriele@medialab.sissa.it \
    --cc=71777@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).