* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
@ 2020-09-05 3:04 Allen Li
2020-09-05 14:28 ` Drew Adams
2021-06-12 12:29 ` Lars Ingebrigtsen
0 siblings, 2 replies; 7+ messages in thread
From: Allen Li @ 2020-09-05 3:04 UTC (permalink / raw)
To: 43209
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2020-09-05 3:04 bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled Allen Li
@ 2020-09-05 14:28 ` Drew Adams
2020-09-05 22:25 ` Allen Li
2021-06-12 12:29 ` Lars Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2020-09-05 14:28 UTC (permalink / raw)
To: Allen Li, 43209
> 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).
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2020-09-05 14:28 ` Drew Adams
@ 2020-09-05 22:25 ` Allen Li
0 siblings, 0 replies; 7+ messages in thread
From: Allen Li @ 2020-09-05 22:25 UTC (permalink / raw)
To: Drew Adams; +Cc: 43209
Drew Adams <drew.adams@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).
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2020-09-05 3:04 bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled Allen Li
2020-09-05 14:28 ` Drew Adams
@ 2021-06-12 12:29 ` Lars Ingebrigtsen
2021-06-15 23:09 ` Allen Li
1 sibling, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-12 12:29 UTC (permalink / raw)
To: Allen Li; +Cc: 43209
Allen Li <darkfeline@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2021-06-12 12:29 ` Lars Ingebrigtsen
@ 2021-06-15 23:09 ` Allen Li
2021-06-19 12:21 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Allen Li @ 2021-06-15 23:09 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43209
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
On Sat, Jun 12, 2021 at 12:29 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Allen Li <darkfeline@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
>
[-- Attachment #2: Type: text/html, Size: 2031 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2021-06-15 23:09 ` Allen Li
@ 2021-06-19 12:21 ` Lars Ingebrigtsen
2021-06-23 5:33 ` Allen Li
0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-19 12:21 UTC (permalink / raw)
To: Allen Li; +Cc: 43209
Allen Li <darkfeline@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled
2021-06-19 12:21 ` Lars Ingebrigtsen
@ 2021-06-23 5:33 ` Allen Li
0 siblings, 0 replies; 7+ messages in thread
From: Allen Li @ 2021-06-23 5:33 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43209-done
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
On Sat, Jun 19, 2021 at 12:21 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Allen Li <darkfeline@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
>
[-- Attachment #2: Type: text/html, Size: 1838 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-23 5:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-05 3:04 bug#43209: 27.1; rectangle-mark-mode does not activate region if transient mark mode disabled Allen Li
2020-09-05 14:28 ` Drew Adams
2020-09-05 22:25 ` Allen Li
2021-06-12 12:29 ` Lars Ingebrigtsen
2021-06-15 23:09 ` Allen Li
2021-06-19 12:21 ` Lars Ingebrigtsen
2021-06-23 5:33 ` Allen Li
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).