GNU bug report logs - #62892
proposal to extend mark-sexp to go forward and backward on command

Previous Next

Package: emacs;

Reported by: Zachary Kanfer <zkanfer <at> gmail.com>

Date: Mon, 17 Apr 2023 02:26:02 UTC

Severity: normal

Full log


Message #74 received at 62892 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Zachary Kanfer <zkanfer <at> gmail.com>
Cc: Ruijie Yu <ruijie <at> netyu.xyz>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 62892 <at> debbugs.gnu.org
Subject: Re: bug#62892: proposal to extend mark-sexp to go forward and
 backward on command
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.




This bug report was last modified 2 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.