From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#62892: proposal to extend mark-sexp to go forward and backward on command Date: Wed, 03 May 2023 20:29:45 +0300 Organization: LINKOV.NET Message-ID: <864jotwcfq.fsf@mail.linkov.net> References: <86jzxwuedr.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Ruijie Yu , Stefan Monnier , 62892@debbugs.gnu.org To: Zachary Kanfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 03 19:35:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puGNr-0006xW-DM for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 May 2023 19:35:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puGNb-0006KH-7O; Wed, 03 May 2023 13:35:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puGNa-0006K1-99 for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 13:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1puGNZ-00039K-W1 for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 13:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puGNZ-0005cP-SF for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 13:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 May 2023 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62892 X-GNU-PR-Package: emacs Original-Received: via spool by 62892-submit@debbugs.gnu.org id=B62892.168313526321529 (code B ref 62892); Wed, 03 May 2023 17:35:01 +0000 Original-Received: (at 62892) by debbugs.gnu.org; 3 May 2023 17:34:23 +0000 Original-Received: from localhost ([127.0.0.1]:47675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puGMx-0005bA-G8 for submit@debbugs.gnu.org; Wed, 03 May 2023 13:34:23 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puGMv-0005ap-Lw for 62892@debbugs.gnu.org; Wed, 03 May 2023 13:34:22 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id F050FE0002; Wed, 3 May 2023 17:34:12 +0000 (UTC) In-Reply-To: (Zachary Kanfer's message of "Wed, 3 May 2023 02:10:01 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260985 Archived-At: >> 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.