GNU bug report logs - #42663
28.0.50; rectangle-mark-mode does not behave as documented when transient-mark-mode is off

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sun, 2 Aug 2020 04:20:02 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42663 in the body.
You can then email your comments to 42663 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Sun, 02 Aug 2020 04:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 02 Aug 2020 04:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; rectangle-mark-mode does not behave as documented when
 transient-mark-mode is off
Date: Sat, 01 Aug 2020 21:19:22 -0700
Hello,

rectangle-mark-mode's docstring says

    Toggle the region as rectangular.  Activates the region if needed.
    Only lasts until the region is deactivated.

However, when Transient Mark mode is off,

1) the region does not get activated by C-x SPC;

2) the mode lasts until the mark is subsequently activated and then
   deactivated again; and

3) rectangle-mark-mode works inconsistently until the mark is activated:
   killing the region kills the rectangle, but C-x C-x does not rotate
   through the four corners of the rectangle.

I think the simplest fix might be for rectangle-mark-mode to activate
the mark even when Transient Mark mode is off.  I think I'll probably
add that to my own configuration, where Transient Mark mode is off.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Sun, 02 Aug 2020 14:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 42663 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 42663 <at> debbugs.gnu.org
Subject: Re: bug#42663: 28.0.50;
 rectangle-mark-mode does not behave as documented when
 transient-mark-mode is off
Date: Sun, 02 Aug 2020 17:12:38 +0300
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Sat, 01 Aug 2020 21:19:22 -0700
> 
> rectangle-mark-mode's docstring says
> 
>     Toggle the region as rectangular.  Activates the region if needed.
>     Only lasts until the region is deactivated.
> 
> However, when Transient Mark mode is off,
> 
> 1) the region does not get activated by C-x SPC;
> 
> 2) the mode lasts until the mark is subsequently activated and then
>    deactivated again; and
> 
> 3) rectangle-mark-mode works inconsistently until the mark is activated:
>    killing the region kills the rectangle, but C-x C-x does not rotate
>    through the four corners of the rectangle.
> 
> I think the simplest fix might be for rectangle-mark-mode to activate
> the mark even when Transient Mark mode is off.  I think I'll probably
> add that to my own configuration, where Transient Mark mode is off.

I'm not sure the current behavior you described is a bug.  You seem to
be so confident it is that you haven't even provide an explanation why
you think so, and a naïve reading of the doc string doesn't make that
obvious (e.g., "if needed" could cover item 1).  In general, when
transient-mark-mode is off, Emacs behaves differently than when it's
on, and that's by design.

So could you please provide a more detailed explanation why you think
these are bugs?

Thanks.




Added tag(s) moreinfo. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 13 Aug 2020 16:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Tue, 22 Sep 2020 15:47:02 GMT) Full text and rfc822 format available.

Message #13 received at 42663 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42663 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#42663: 28.0.50; rectangle-mark-mode does not behave as
 documented when transient-mark-mode is off
Date: Tue, 22 Sep 2020 17:46:06 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> I'm not sure the current behavior you described is a bug.  You seem to
> be so confident it is that you haven't even provide an explanation why
> you think so, and a naïve reading of the doc string doesn't make that
> obvious (e.g., "if needed" could cover item 1).  In general, when
> transient-mark-mode is off, Emacs behaves differently than when it's
> on, and that's by design.
>
> So could you please provide a more detailed explanation why you think
> these are bugs?

More information was requested some months ago, but none was received,
so I'm closing this bug report.  If this is still a problem, please
respond to the debbugs mail address, and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 42663 <at> debbugs.gnu.org and Sean Whitton <spwhitton <at> spwhitton.name> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 22 Sep 2020 15:47:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Oct 2020 11:24:07 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 21:41:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 21:41:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Fri, 24 Dec 2021 21:42:01 GMT) Full text and rfc822 format available.

Message #24 received at 42663 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>, 42663 <at> debbugs.gnu.org
Subject: Re: bug#42663: 28.0.50; rectangle-mark-mode does not behave as
 documented when transient-mark-mode is off
Date: Fri, 24 Dec 2021 14:41:51 -0700
[Message part 1 (text/plain, inline)]
control: tag -1 + patch - moreinfo

Hello,

On Sun 02 Aug 2020 at 05:12PM +03, Eli Zaretskii wrote:

> I'm not sure the current behavior you described is a bug.  You seem to
> be so confident it is that you haven't even provide an explanation why
> you think so, and a naïve reading of the doc string doesn't make that
> obvious (e.g., "if needed" could cover item 1).  In general, when
> transient-mark-mode is off, Emacs behaves differently than when it's
> on, and that's by design.
>
> So could you please provide a more detailed explanation why you think
> these are bugs?

Apologies, it was not my intention to suggest that I'm sure the
behaviour should change.  I reported a bug because I found what seemed
like inconsistencies between the documentation and the behaviour of the
command.  From my point of view, improving the documentation without
changing the behaviour of the command would resolve the issue.

Thus, I'm attaching a documentation patch.  Hope it can be installed.

-- 
Sean Whitton
[0001-Improve-rectangle-mark-mode-documentation-regarding-.patch (text/x-patch, attachment)]

Removed tag(s) moreinfo. Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 21:43:01 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 21:43:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Sat, 25 Dec 2021 07:56:02 GMT) Full text and rfc822 format available.

Message #31 received at 42663 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 42663 <at> debbugs.gnu.org
Subject: Re: bug#42663: 28.0.50; rectangle-mark-mode does not behave as
 documented when transient-mark-mode is off
Date: Sat, 25 Dec 2021 09:55:36 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Fri, 24 Dec 2021 14:39:46 -0700
> 
> Apologies, it was not my intention to suggest that I'm sure the
> behaviour should change.  I reported a bug because I found what seemed
> like inconsistencies between the documentation and the behaviour of the
> command.  From my point of view, improving the documentation without
> changing the behaviour of the command would resolve the issue.
> 
> Thus, I'm attaching a documentation patch.  Hope it can be installed.

Thanks.  I have a couple of comments:

> --- 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.

> +When the region is active and in rectangle-mark-mode, @kbd{C-x C-x}

After "when the region is active", I would add a cross-reference to
"Mark", where this is described.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42663; Package emacs. (Mon, 27 Dec 2021 20:05:01 GMT) Full text and rfc822 format available.

Message #34 received at 42663 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>, 42663 <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
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
[v2-0001-Improve-rectangle-mark-mode-documentation-regardi.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 28 Dec 2021 17:41:01 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Tue, 28 Dec 2021 17:41:01 GMT) Full text and rfc822 format available.

Message #39 received at 42663-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 42663-done <at> debbugs.gnu.org
Subject: Re: bug#42663: 28.0.50; rectangle-mark-mode does not behave as
 documented when transient-mark-mode is off
Date: Tue, 28 Dec 2021 19:40:28 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Mon, 27 Dec 2021 13:04:07 -0700
> 
> > 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.

Thanks, installed on the emacs-28 branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Jan 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.