From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#42663: 28.0.50; rectangle-mark-mode does not behave as documented when transient-mark-mode is off Date: Mon, 27 Dec 2021 13:04:07 -0700 Message-ID: <87a6glzufc.fsf@melete.silentflame.com> References: <87sfuh1y3h.fsf@melete.silentflame.com> <83r1a1qft3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) To: Eli Zaretskii , 42663@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 27 21:05:46 2021 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 1n1wFc-0001y1-Lh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 21:05:45 +0100 Original-Received: from localhost ([::1]:36768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1wFa-0004zJ-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 15:05:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1wF8-0004yv-6X for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 15:05:15 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1wEw-00014D-2Y for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 15:05:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1wEv-00014v-T7 for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 15:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Dec 2021 20:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42663 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42663-submit@debbugs.gnu.org id=B42663.16406354574061 (code B ref 42663); Mon, 27 Dec 2021 20:05:01 +0000 Original-Received: (at 42663) by debbugs.gnu.org; 27 Dec 2021 20:04:17 +0000 Original-Received: from localhost ([127.0.0.1]:44351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1wEC-00013P-Hn for submit@debbugs.gnu.org; Mon, 27 Dec 2021 15:04:16 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:38241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1wEB-000136-0A for 42663@debbugs.gnu.org; Mon, 27 Dec 2021 15:04:15 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3DC7D3200F88; Mon, 27 Dec 2021 15:04:09 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 27 Dec 2021 15:04:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=B+llDh9Uz5FZ3/drWnJNd9oMaa TUrG00axK4JaQ3DME=; b=GmrcZzBGZ8DR5rpl3zcLpiNtQLatADN4W16Q9/IK4V QgLLSbnFBTFdzplqiHe2+aIayA/cVFmfyOyhdaJhfVSvq4Djhe5iOT+gKZIk1gTh wX4d4zkkgPEy+3iTEeecdrwp0U9Nszwa1XOrTLOsHG37U8mlaztzRjgarU6teIit qxkU8l9SCnDWXeD1iZYisDcnszYxcA79qADkQCm8My8hsehpEc4w10hCnn3WUoM/ +RcYDvbbBVcKlPV/S7HM/44WAZA5RdFglmRqyFYlGYMJwe8G9bwU3ohkLzm2oRCz 5eFAQeS5IxJXnQIvrL2hXUPfpN7jjDs3JYKcwzmCTJFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=B+llDh 9Uz5FZ3/drWnJNd9oMaaTUrG00axK4JaQ3DME=; b=Q4J96Op927SLsRJ3nbafWJ 4kMLPuYOWVl1DS2sWT2yQnveFdxOnX+CDo50YIT44m6Un1XZH6bww45o2+8ykCYB Teg6oQzhj3h0mhWzW+bw3VKzmg8zjPkvhsUuRfgSWiDgdQNEn0cMavUWKNvZ3/K6 HK3QWZCFqKRN7/YnXbUpuRqzmH3qphiFn1ThCRxk6vqnn2oMzwJ0pprA324a0tKS yzC7k0EteMHUeitpL+1l/OV12AUHKrEnbJXl4KsBVsF1grzxqRu0VONmDNX6+kur nH/7cGHYNOv3zm99yQ7YqxLYv9YwuakcHhdFneZODQe1/kyHRX9uW3AjpyrTFdLQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesmhdttdertdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpefgueeutedvkeffgedvveetheejieetvdduvdffheevgfet vdfghfetteffvdevjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Dec 2021 15:04:08 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id B4DF87F7FAA; Mon, 27 Dec 2021 13:04:07 -0700 (MST) In-Reply-To: <83r1a1qft3.fsf@gnu.org> 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" Xref: news.gmane.io gmane.emacs.bugs:223218 Archived-At: --=-=-= Content-Type: text/plain Hello, On Sat 25 Dec 2021 at 09:55AM +02, Eli Zaretskii wrote: >> --- a/doc/emacs/killing.texi >> +++ b/doc/emacs/killing.texi >> @@ -923,11 +923,11 @@ Rectangles >> @findex rectangle-mark-mode >> The command @kbd{C-x @key{SPC}} (@code{rectangle-mark-mode}) toggles >> whether the region-rectangle or the standard region is highlighted >> -(first activating the region if necessary). When this mode is enabled, >> -commands that resize the region (@kbd{C-f}, @kbd{C-n} etc.)@: do >> -so in a rectangular fashion, and killing and yanking operate on the >> -rectangle. @xref{Killing}. The mode persists only as long as the >> -region is active. >> +(first activating the region if necessary, unless Transient Mark mode >> +is off). When this mode is enabled, commands that resize the region >> +(@kbd{C-f}, @kbd{C-n} etc.)@: do so in a rectangular fashion, and >> +killing and yanking operate on the rectangle. @xref{Killing}. The >> +mode persists until the next time the region becomes inactive. > > The new text is IMO not accurate, because toggling the mode doesn't > depend on Transient Mark mode. It's the "active mark" state that > depends on Transient Mark mode, in the sense that the mark doesn't > automatically become active when Transient Mark mode is off and > set-mark-command or push-mark is called. > > So I think a better documentation change would be to say that > rectangle mark mode only works when the mark is active, and point to > "Disabled Transient Mark" node of the manual for how to do that when > Transient Mark mode is off. This should probably be a separate > paragraph, after the current text. Yes, that's better, thank you. Revised patch enclosed. -- Sean Whitton --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0001-Improve-rectangle-mark-mode-documentation-regardi.patch >From 6b7d5550ce7a5b72712730248f9d8f07f15e7483 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 27 Dec 2021 12:58:25 -0700 Subject: [PATCH v2] Improve rectangle-mark-mode documentation regarding mark activation * doc/emacs/killing.texi: Describe how rectangle-mark-mode works when Transient Mark mode is off. Qualify discussion of rectangle-exchange-point-and-mark to say that it cycles the four corners only when the region is active. * lisp/rect.el (rectangle-mark-mode): State that rectangle-mark-mode does not activate the mark when Transient Mark mode is off. Reword sentence about how long the mode lasts to account for when Transient Mark mode is off. --- doc/emacs/killing.texi | 16 +++++++++++----- lisp/rect.el | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 375ac970d7..3815c0fef6 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -929,6 +929,11 @@ Rectangles rectangle. @xref{Killing}. The mode persists only as long as the region is active. +The region-rectangle works only when the mark is active. In +particular, when Transient Mark mode is off (@pxref{Disabled Transient +Mark}), in addition to typing @kbd{C-x @key{SPC}} you will need to +activate the mark. + Unlike the standard region, the region-rectangle can have its corners extended past the end of buffer, or inside stretches of white space that point normally cannot enter, like in the middle of a TAB @@ -937,11 +942,12 @@ Rectangles @findex rectangle-exchange-point-and-mark @findex exchange-point-and-mark@r{, in rectangle-mark-mode} @kindex C-x C-x@r{, in rectangle-mark-mode} -When the region is in rectangle-mark-mode, @kbd{C-x C-x} runs the -command @code{rectangle-exchange-point-and-mark}, which cycles between -the four corners of the region-rectangle. This comes in handy if you -want to modify the dimensions of the region-rectangle before invoking -an operation on the marked text. +When the region is active (@pxref{Mark}) and in rectangle-mark-mode, +@kbd{C-x C-x} runs the command +@code{rectangle-exchange-point-and-mark}, which cycles between the +four corners of the region-rectangle. This comes in handy if you want +to modify the dimensions of the region-rectangle before invoking an +operation on the marked text. @node CUA Bindings @section CUA Bindings diff --git a/lisp/rect.el b/lisp/rect.el index d288adfbaf..80f992e182 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -651,7 +651,8 @@ rectangle-mark-mode-map (define-minor-mode rectangle-mark-mode "Toggle the region as rectangular. -Activates the region if needed. Only lasts until the region is deactivated." +Activates the region if it's inactive and Transient Mark mode is +on. Only lasts until the region is next deactivated." :lighter nil (rectangle--reset-crutches) (when rectangle-mark-mode -- 2.30.2 --=-=-=--