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: Wed, 26 Apr 2023 09:28:47 +0300 Message-ID: <835y9jupgg.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ruijie@netyu.xyz, monnier@iro.umontreal.ca, 62892@debbugs.gnu.org, mardani29@yahoo.es To: Zachary Kanfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 26 08:29:25 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 1prYea-0006Ci-Ec for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Apr 2023 08:29:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prYeP-0008GD-Le; Wed, 26 Apr 2023 02:29:15 -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 1prYeF-0008Fj-1P for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 02:29:05 -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 1prYeE-0008R8-L5 for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 02:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prYeE-0002mE-AH for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 02:29: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: Wed, 26 Apr 2023 06:29: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.168249051010631 (code B ref 62892); Wed, 26 Apr 2023 06:29:02 +0000 Original-Received: (at 62892) by debbugs.gnu.org; 26 Apr 2023 06:28:30 +0000 Original-Received: from localhost ([127.0.0.1]:54112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prYdh-0002lP-Ns for submit@debbugs.gnu.org; Wed, 26 Apr 2023 02:28:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prYdf-0002lB-65 for 62892@debbugs.gnu.org; Wed, 26 Apr 2023 02:28:28 -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 1prYdY-0008HW-Ao; Wed, 26 Apr 2023 02:28:20 -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=zmQdIitmQEffY/upxyT4SszD5/qKf+B2dPEgrLAd2nA=; b=YEZlPMgjrxxH 9irf2Ig4xjgtK2F95h3Fv2xP0hVegYtCOAAwWtvDJgIXxicxXBPg2PDiy6SEPLHU/NQDBbqiO6QEa b4+sIvM3M8P+F0BvmLvwMB4WrXFxPtq/UBqbSvYW4PmpqDvqo0A8On74BjTlE4Qa8X11CxCxME4Yt OwhCp1NjYKiLMbcj2zCAyzsQMHaOYvA1v+pw4J5twSP16UWcFtdrpQq79SGk+I6xxGOaLuqm1dFz7 CmzUN8lkxi0BOm+dWz45jxiqx14KTKzYfuQ48rTuhPPqTmC6E2rctFJcP6je0pqOKoxOXciTxZO5R veA8SUyHYxX21dsF10zGxg==; 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 1prYdW-00027V-Lr; Wed, 26 Apr 2023 02:28:19 -0400 In-Reply-To: (message from Zachary Kanfer on Wed, 26 Apr 2023 00:41:45 -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:260649 Archived-At: > Cc: Ruijie Yu , Stefan Monnier , > 62892@debbugs.gnu.org > From: Zachary Kanfer > Date: Wed, 26 Apr 2023 00:41:45 -0400 > > The documentation for mark-sexp says: > > > Set mark ARG sexps from point. > > The place mark goes is the same place C-M- would > > move to with the same argument. > > This is correct but misleading. Please elaborate: how could it mislead? > Worse still is the next part: > > > Interactively, if this command is repeated > > or (in Transient Mark mode) if the mark is active, > > it marks the next ARG sexps after the ones already marked. > > This says it marks sexps *after* the ones already marked. This is incorrect; if point is *after* mark, and > mark is active, this function marks sexps *before* the ones already marked. I cannot reproduce this behavior, if I understand your description correctly. Please show a recipe, starting from "emacs -Q", to reproduce. > > In my opinion, the description of that feature should not be part of the > > mark-sexp command documentation, because the feature is actually > > provided by C-x C-x (exchange-point-and-mark). > > One way for this situation to occur is by using C-x C-x, yes, but it's not the only way. You can set point, > move forward sexps, and then calling mark-sexp will mark sexps backwards. > > There is specific code in mark-sexp to check which direction to move; it should be documented as > such. Please also demonstrate this behavior and point to that code, so we will know what you are alluding to. Thanks.