GNU bug report logs - #43209
27.1; rectangle-mark-mode does not activate region if transient mark mode disabled

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Sat, 5 Sep 2020 03:05:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Done: Allen Li <darkfeline <at> felesatra.moe>

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 43209 in the body.
You can then email your comments to 43209 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#43209; Package emacs. (Sat, 05 Sep 2020 03:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Allen Li <darkfeline <at> felesatra.moe>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 05 Sep 2020 03:05:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; rectangle-mark-mode does not activate region if transient
 mark mode disabled
Date: Fri, 04 Sep 2020 20:04:06 -0700
rectangle-mark-mode does not activate region if transient mark mode is
disabled.

Steps:

1. emacs -Q
2. M-x transient-mark-mode RET
3. C-x SPC

Expected:

Region is activated temporarily.

Actual:

Region is not activated.  Note that rectagle-mark-mode is still
partially enabled.  For example, C-x C-x moves point according to the
rectangular region, but you cannot move point beyond the end of the
line.

I propose making rectangle-mark-mode activate the region even if
transient-mark-mode is disabled for a number of reasons.

I think it's a reasonable interpretation of the docstring:

Activates the region if needed.  Only lasts until the region is
deactivated.

rectangle-mark-mode is transient like having an active region and unlike
having a mark.  That is to say, someone who uses the mark with
transient-mark-mode off may not want to operate on the region and thus
not want to activate the region (e.g., when using the mark to jump to
later), but there is no use case for rectangle-mark-mode that does not
involve operating on the region.

Also since rectangle-mark-mode is transient, it makes sense to couple it
with region activation as the active region is also transient with the
same lifespan.

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22)
 of 2020-08-13 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Arch Linux





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43209; Package emacs. (Sat, 05 Sep 2020 14:29:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Allen Li <darkfeline <at> felesatra.moe>, 43209 <at> debbugs.gnu.org
Subject: RE: bug#43209: 27.1; rectangle-mark-mode does not activate region if
 transient mark mode disabled
Date: Sat, 5 Sep 2020 07:28:08 -0700 (PDT)
> rectangle-mark-mode does not activate region if transient mark mode is
> disabled.
> 
> Steps:
> 
> 1. emacs -Q
> 2. M-x transient-mark-mode RET
> 3. C-x SPC
> 
> Expected:
> 
> Region is activated temporarily.
> 
> Actual:
> 
> Region is not activated.  Note that rectagle-mark-mode is still
> partially enabled.  For example, C-x C-x moves point according to the
> rectangular region, but you cannot move point beyond the end of the
> line.
> 
> I propose making rectangle-mark-mode activate the region even if
> transient-mark-mode is disabled for a number of reasons.
> 
> I think it's a reasonable interpretation of the docstring:
> 
> Activates the region if needed.  Only lasts until the region is
> deactivated.
> 
> rectangle-mark-mode is transient like having an active region and unlike
> having a mark.  That is to say, someone who uses the mark with
> transient-mark-mode off may not want to operate on the region and thus
> not want to activate the region (e.g., when using the mark to jump to
> later), but there is no use case for rectangle-mark-mode that does not
> involve operating on the region.
> 
> Also since rectangle-mark-mode is transient, it makes sense to couple it
> with region activation as the active region is also transient with the
> same lifespan.

I agree that `rectangle-mark-mode' requires
`transient-mark-mode' to be on.  But only as
long as `rectangle-mark-mode' is on, i.e.,
only as long as the region is active.

After that, the previous state of
`transient-mark-mode' (on or off) should be
restored.

"Active region" has no meaning outside of
`transient-mark-mode'.  Anything, including
`rectangle-mark-mode', that requires the
notion (and behavior - e.g. highlighting) of
the "active region" needs `transient-mark-mode'
to be on (for the duration of that need).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43209; Package emacs. (Sat, 05 Sep 2020 22:26:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 43209 <at> debbugs.gnu.org
Subject: Re: bug#43209: 27.1; rectangle-mark-mode does not activate region
 if transient mark mode disabled
Date: Sat, 05 Sep 2020 15:25:31 -0700
Drew Adams <drew.adams <at> oracle.com> writes:

> I agree that `rectangle-mark-mode' requires
> `transient-mark-mode' to be on.  But only as
> long as `rectangle-mark-mode' is on, i.e.,
> only as long as the region is active.
>
> After that, the previous state of
> `transient-mark-mode' (on or off) should be
> restored.
>
> "Active region" has no meaning outside of
> `transient-mark-mode'.  Anything, including
> `rectangle-mark-mode', that requires the
> notion (and behavior - e.g. highlighting) of
> the "active region" needs `transient-mark-mode'
> to be on (for the duration of that need).

Sure.  I refer to "active region with transient transient-mark-mode" as
just "active region" for brevity.  Basically, I'm saying that C-x SPC
should do the same thing C-SPC C-SPC does when the user has set
transient-mark-mode to nil in their config.

The point of this bug is that C-x SPC does not activate the region (or
does not transiently enable transient-mark-mode and then activate the
region, if you prefer).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43209; Package emacs. (Sat, 12 Jun 2021 12:30:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 43209 <at> debbugs.gnu.org
Subject: Re: bug#43209: 27.1; rectangle-mark-mode does not activate region
 if transient mark mode disabled
Date: Sat, 12 Jun 2021 14:29:09 +0200
Allen Li <darkfeline <at> felesatra.moe> writes:

> rectangle-mark-mode does not activate region if transient mark mode is
> disabled.
>
> Steps:
>
> 1. emacs -Q
> 2. M-x transient-mark-mode RET
> 3. C-x SPC
>
> Expected:
>
> Region is activated temporarily.
>
> Actual:
>
> Region is not activated.  Note that rectagle-mark-mode is still
> partially enabled.  For example, C-x C-x moves point according to the
> rectangular region, but you cannot move point beyond the end of the
> line.
>
> I propose making rectangle-mark-mode activate the region even if
> transient-mark-mode is disabled for a number of reasons.

I'm not quite sure I fully understand the suggestion -- do you mean that
`C-x SPC' should switch transient-mark-mode on if it isn't already?
(And then switch it off again in `deactivate-mark-hook'?)

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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Jun 2021 12:30:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43209; Package emacs. (Tue, 15 Jun 2021 23:11:01 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43209 <at> debbugs.gnu.org
Subject: Re: bug#43209: 27.1; rectangle-mark-mode does not activate region if
 transient mark mode disabled
Date: Tue, 15 Jun 2021 23:09:49 +0000
[Message part 1 (text/plain, inline)]
On Sat, Jun 12, 2021 at 12:29 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Allen Li <darkfeline <at> felesatra.moe> writes:
>
> > rectangle-mark-mode does not activate region if transient mark mode is
> > disabled.
> >
> > Steps:
> >
> > 1. emacs -Q
> > 2. M-x transient-mark-mode RET
> > 3. C-x SPC
> >
> > Expected:
> >
> > Region is activated temporarily.
> >
> > Actual:
> >
> > Region is not activated.  Note that rectagle-mark-mode is still
> > partially enabled.  For example, C-x C-x moves point according to the
> > rectangular region, but you cannot move point beyond the end of the
> > line.
> >
> > I propose making rectangle-mark-mode activate the region even if
> > transient-mark-mode is disabled for a number of reasons.
>
> I'm not quite sure I fully understand the suggestion -- do you mean that
> `C-x SPC' should switch transient-mark-mode on if it isn't already?
> (And then switch it off again in `deactivate-mark-hook'?)
>

Behavior-wise, it should work the same as `C-SPC C-SPC` when
transient-mark-mode is off,
(temporarily enable transient-mark-mode and active region).
I don't remember how that is implemented off the top of my head.


>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43209; Package emacs. (Sat, 19 Jun 2021 12:22:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 43209 <at> debbugs.gnu.org
Subject: Re: bug#43209: 27.1; rectangle-mark-mode does not activate region
 if transient mark mode disabled
Date: Sat, 19 Jun 2021 14:21:06 +0200
Allen Li <darkfeline <at> felesatra.moe> writes:

>  I'm not quite sure I fully understand the suggestion -- do you mean that
>  `C-x SPC' should switch transient-mark-mode on if it isn't already?
>  (And then switch it off again in `deactivate-mark-hook'?)
>
> Behavior-wise, it should work the same as `C-SPC C-SPC` when
> transient-mark-mode is off,
> (temporarily enable transient-mark-mode and active region).
> I don't remember how that is implemented off the top of my head.

We don't normally switch transient mark mode on (even temporarily)
unless the user has requested so (with `C-SPC C-SPC', for instance).  So
I still don't understand why this rectangle command should do so.

`C-x SPC' seems to work fine both with transient mode on or off, as far
as I can tell?

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




Reply sent to Allen Li <darkfeline <at> felesatra.moe>:
You have taken responsibility. (Wed, 23 Jun 2021 05:34:02 GMT) Full text and rfc822 format available.

Notification sent to Allen Li <darkfeline <at> felesatra.moe>:
bug acknowledged by developer. (Wed, 23 Jun 2021 05:34:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 43209-done <at> debbugs.gnu.org
Subject: Re: bug#43209: 27.1; rectangle-mark-mode does not activate region if
 transient mark mode disabled
Date: Wed, 23 Jun 2021 05:33:10 +0000
[Message part 1 (text/plain, inline)]
On Sat, Jun 19, 2021 at 12:21 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Allen Li <darkfeline <at> felesatra.moe> writes:
>
> >  I'm not quite sure I fully understand the suggestion -- do you mean that
> >  `C-x SPC' should switch transient-mark-mode on if it isn't already?
> >  (And then switch it off again in `deactivate-mark-hook'?)
> >
> > Behavior-wise, it should work the same as `C-SPC C-SPC` when
> > transient-mark-mode is off,
> > (temporarily enable transient-mark-mode and active region).
> > I don't remember how that is implemented off the top of my head.
>
> We don't normally switch transient mark mode on (even temporarily)
> unless the user has requested so (with `C-SPC C-SPC', for instance).  So
> I still don't understand why this rectangle command should do so.
>
> `C-x SPC' seems to work fine both with transient mode on or off, as far
> as I can tell?
>

I suppose it does.  I guess I originally did not appreciate how one could
use rectangle-mark-mode
with a non-active region, but it seems to work as the me today expects, so
I'll close this bug.


>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

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

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

Previous Next


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