From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62892: proposal to extend mark-sexp to go forward and backward on command Date: Thu, 01 Jun 2023 09:32:39 +0300 Message-ID: <837csnelq0.fsf@gnu.org> References: <86jzxwuedr.fsf@mail.linkov.net> <83ttvzlj88.fsf@gnu.org> <83mt1kg15o.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23984"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, zkanfer@gmail.com, juri@linkov.net, ruijie@netyu.xyz, 62892@debbugs.gnu.org, drew.adams@oracle.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 01 08:33:42 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 1q4bsU-0005zt-Bq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Jun 2023 08:33:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4bru-0007n8-SK; Thu, 01 Jun 2023 02:33:06 -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 1q4brs-0007m6-2Q for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2023 02:33:04 -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 1q4brq-0003EM-LF for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2023 02:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q4brq-00051J-2b for bug-gnu-emacs@gnu.org; Thu, 01 Jun 2023 02:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jun 2023 06:33:02 +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.168560113119237 (code B ref 62892); Thu, 01 Jun 2023 06:33:02 +0000 Original-Received: (at 62892) by debbugs.gnu.org; 1 Jun 2023 06:32:11 +0000 Original-Received: from localhost ([127.0.0.1]:36742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4br0-00050D-R3 for submit@debbugs.gnu.org; Thu, 01 Jun 2023 02:32:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4bqy-0004zx-On for 62892@debbugs.gnu.org; Thu, 01 Jun 2023 02:32:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4bqs-0002zL-9Y; Thu, 01 Jun 2023 02:32:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vCjuEJIcHT2y4aKEjQBw7pSdizK0OEmEaBSik9clLT8=; b=QHgTglKmT8cf 7e1WN6NndQ9eOV8JFuTkMbdRsIuB+VbFm+T84/gZOh6HZV0EaFSD4KrR7AX/sXMM4apG5srTvpHUo unLWQR18sidIuPm5DRmNm6f7skqpjHJHdINOAUTxvL8d/b+Edar/aK9/RHpqYsWEQM76LsInzwxh8 UblwtflKdzttBu29f0kmf2komJuTf/NLEB0mTkqDGJAvp2f0vLoNsKIOScaTKE0RxMlsaxxvF6flQ YNpbQuI910HpaQh8E+lu71K20gAEK7waNM/Wq/HGg/BvtzscyyqQQyDExlKHccoM//ZGK6nzvbHX0 J9+6vprhSiGSqbD4Spi7rQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4bqk-0000Ut-PY; Thu, 01 Jun 2023 02:31:55 -0400 In-Reply-To: (message from Stefan Monnier on Wed, 31 May 2023 23:54:48 -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:262687 Archived-At: > From: Stefan Monnier > Cc: Zachary Kanfer , rms@gnu.org, ruijie@netyu.xyz, > 62892@debbugs.gnu.org, drew.adams@oracle.com, juri@linkov.net > Date: Wed, 31 May 2023 23:54:48 -0400 > > > No, it should only move point, not the mark. The mark should stay > > where point was before invoking the command. > > Hmm? Really? > That would make it equivalent to `forward-sexp`, no? That's exactly the idea: move like forward-sexp and mark the sexps moved across. > > This is correct, but only for commands that do something with the text > > in the region: limit search/replace to it, or spell-check the text in > > it, etc. mark-sexp doesn't do anything like that, it actually > > _modifies_ the region. So the fact that it changes its effect > > depending on whether the region is active is IMO pretty confusing and > > unexpected. > > Agreed, tho for `mark-sexp` when `transient-mark-mode` is enabled, it > makes sense to treat "region not active" differently from "region > active", since `mark-sexp` mostly moves the mark but when the region is > not active, it means the mark is "an old obsolete mark" that the user > may not remember any more. I'm not lobbying for changing the behavior of mark-sexp. It's too late for that, no matter what my opinion about that is. I'm saying that it could make sense to have much simpler commands whose effect is always predictable in advance, even if you don't use them frequently, and even if you sometimes have transient-mark-mode on and sometimes off.