From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : forward-sexp
Date: Sun, 13 Aug 2023 15:04:50 +0000 [thread overview]
Message-ID: <SJ0PR10MB548854158A2A62E83800D67CF316A@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <83il9jctvh.fsf@gnu.org>
> > While every mode is entitled to design commands at their needs, it
> > must respect semantic.
> >
> > ‘sexp’ is documented as ‘balanced expression’.
> >
> > If an expression starts with an [, I'm holding its balancing
> > counterpart as obvious. No ( or other char may come into scope.
>
> But only if [ and ( are treated as a parenthesis by the major mode.
Exactly the point.
___
Andreas: If you feel that a sexp is defined
poorly for `fundamental-mode', or if you feel
that it's defined as you think it should be
but `forward-sexp' in `fundamental-mode'
doesn't fit that definition, then consider
reporting a bug or requesting an enhancement:
`M-x report-emacs-bug'.
That's the point. A "sexp" is _whatever the
major mode says it is_. And `forward-sexp',
in any mode, should move past the next sexp
according to what the mode defines as a sexp.
(By "should", I mean _conventionally_, so
that code relying on `forward-sexp' works as
one expects. Nothing _prevents_ a mode from
defining `forward-sexp' from doing anything
it wants: ringing a bell, baking a cake,...
And no, it's not "obvious" that `]' is a
balanced counterpart to `['. And neither is
it obvious, even if that were always the case,
that what follows `[' up till the next `]' is
to be ignored.
All such "sexp" behavior is _defined_ by the
mode, _for_ the mode. "Sexp is of the mode,
by the mode, and for the mode." - A.L.
You seem to have some underlying assumptions
wrt `[' (or perhaps wrt `(') that you don't
express explicitly, and which conflict with
how "sexp" is defined for `fundamental-mode'
(or perhaps for _any_ mode?).
`M-x report-emacs-bug', to make your
expectations/preferences explicit. But be
specific, wrt both the mode and the exact
behavior you expect/want.
next prev parent reply other threads:[~2023-08-13 15:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 17:23 forward-sexp Andreas Röhler
2023-08-11 17:43 ` [External] : forward-sexp Drew Adams
2023-08-11 17:58 ` Emanuel Berg
2023-08-11 19:20 ` Andreas Röhler
2023-08-11 19:47 ` Pierre Rouleau
2023-08-11 20:02 ` Andreas Röhler
2023-08-11 20:07 ` Drew Adams
2023-08-11 20:09 ` Pierre Rouleau
2023-08-11 20:17 ` Emanuel Berg
2023-08-11 20:14 ` Emanuel Berg
2023-08-12 20:41 ` Drew Adams
2023-08-12 22:23 ` Emanuel Berg
2023-08-13 14:02 ` Pierre Rouleau
2023-08-13 15:42 ` Drew Adams
2023-08-13 16:45 ` Pierre Rouleau
2023-08-20 4:08 ` Emanuel Berg
2023-08-20 4:04 ` Emanuel Berg
2023-08-20 3:50 ` Emanuel Berg
2023-08-13 15:08 ` Drew Adams
2023-08-11 20:23 ` Drew Adams
2023-08-11 20:30 ` Emanuel Berg
2023-08-12 20:42 ` Drew Adams
2023-08-12 22:12 ` Emanuel Berg
2023-08-13 15:08 ` Drew Adams
2023-08-12 6:44 ` Andreas Röhler
2023-08-11 20:09 ` Emanuel Berg
2023-08-11 20:01 ` Drew Adams
2023-08-11 20:06 ` Emanuel Berg
2023-08-12 20:41 ` Drew Adams
2023-08-12 22:14 ` Emanuel Berg
2023-08-13 6:53 ` Andreas Röhler
2023-08-13 6:57 ` Eli Zaretskii
2023-08-13 15:04 ` Drew Adams [this message]
2023-08-20 4:48 ` Emanuel Berg
2023-09-09 7:22 ` Andreas Röhler
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=SJ0PR10MB548854158A2A62E83800D67CF316A@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.