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, 20 Apr 2023 10:16:30 +0300 Message-ID: <83a5z36n1t.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15232"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ruijie@netyu.xyz, 62892@debbugs.gnu.org, Juri Linkov To: Zachary Kanfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 20 09:18:54 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 1ppOZC-0003la-3e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Apr 2023 09:18:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppOXP-0002nT-K3; Thu, 20 Apr 2023 03:17: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 1ppOXO-0002n2-K8 for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 03:17: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 1ppOXO-00029z-Aj for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 03:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppOXO-0008Ar-5r for bug-gnu-emacs@gnu.org; Thu, 20 Apr 2023 03:17: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, 20 Apr 2023 07:17: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.168197498831374 (code B ref 62892); Thu, 20 Apr 2023 07:17:02 +0000 Original-Received: (at 62892) by debbugs.gnu.org; 20 Apr 2023 07:16:28 +0000 Original-Received: from localhost ([127.0.0.1]:36439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppOWp-00089w-Qh for submit@debbugs.gnu.org; Thu, 20 Apr 2023 03:16:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppOWn-00089h-Eu for 62892@debbugs.gnu.org; Thu, 20 Apr 2023 03:16:26 -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 1ppOWg-00023K-F2; Thu, 20 Apr 2023 03:16:19 -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=+eTyGeaKAKSVQwnmW8X/sVflTHryL+1BqyXBxQdiO7s=; b=S5g6qc1SrS7U /PyFcfIgTDdPRtdq/WYYqqblEJ87ki8CfgCkLgNR5Zhiym4tlCJ1JMhVy69/NR/kTkh2rzHjZk4dg ff2SXE1Sdy38REIm4j7Jae7q6mjHk0utlD2M3V3wwmtUBQu+c0fPn1KgenF4HRGKUIj3l9O9mEWgo eccwlShhSPChVxyPntPfQLdfKVndXjGjtzcXO+z8lYnqwGln8XSwz4affI9/jxwRpQOt4w7WErWss XmUqDQaNfa4H0I02OQHDf5IKHVUVTgC1VdrvXCPbG1V7BMqUcY0Yn7+ARcAwcsJiHKKjzxyG9CmbL 7KC+rHG4a4DAxFj3LTuRvQ==; 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 1ppOWf-0003GI-Ry; Thu, 20 Apr 2023 03:16:18 -0400 In-Reply-To: (message from Zachary Kanfer on Thu, 20 Apr 2023 01:25:29 -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:260311 Archived-At: > Cc: 62892@debbugs.gnu.org > From: Zachary Kanfer > Date: Thu, 20 Apr 2023 01:25:29 -0400 > > > If this is to be accepted, why not extend it to all like mark functions, > > listed below? Implementing them should be pretty similar, and you might > > even be able to reuse the same helper for all these variants. Also, the > > helper function might need to contain a double-dash in its name because > > this is inherently a private function. > > This makes sense to me, although I have not found the same need for these to be marked. I'm happy > to extend them as such; I'll add that in a later patch. > > > Please use `quote' to quote things in Emacs docstrings. Also, both here > > and in other docstrings, the newline immediately after the first line, > > while seems necessary, is usually redundant in Emacs docstrings. And > > there is a typo: "amrk" -> "mark". > > > > I also think you shouldn't use wildcard-like elements in quotes (in your > > case, you reuse part of the name in the quote), but I'm not sure. > > Done. Updated patch attached. Thanks. Did you see the comment by Juri, viz.: > Did you know that it's possible to switch directions by typing 'C-x C-x'. > After that 'C-M-@' extends the region backwards. AFAIU, this means we already have an easy method to have C-M-@ switch directions, and the changes you propose might therefore be unnecessary. WDYT?