Subject: Re: bug#62892: proposal to extend mark-sexp to go forward and backward on command

From: Juri Linkov <[email-masked]>
Date: Wed, 03 May 2023 20:29:45 +0300

>> Thanks for the patch.  It would be nice to have such commands
>> even not bound to default keys, so the users are free to bind
>> them to any keys.
>
> That's my hope, unless sufficiently good default keys can be found. I like
> C-M-space and C-M-S-space, which are both currently bound to mark-sexp, but
> changing the default keys is not trivially done.

Please also note that the reason why the current single binding is sufficient
is because it's needed only to extend the region at the opposite side of
the selected region where the mark is located, i.e. it only moves the mark.
Whereas to move the region boundary under point is easy with sexp navigation
commands (that keep the region active).  However, your two commands
are duplicating the task of moving point.  But maybe this is easier to use
for some users.

>> Another variant is to use a single argument JUMPFORM like
>> in 'isearch-yank-internal' that allows not to leak the
>> prefix argument to the helper function:
>
> This is tempting. The downside I'm seeing to this -- which I'll think more
> about to see if I can get around it -- is that we don't know if we need to
> call JUMPFORM from point or mark.

Indeed, because you need to handle motion in two directions.