GNU bug report logs - #66780
[PATCH] Improve rectangle-mark-mode when transient-mark-mode is off

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Fri, 27 Oct 2023 20:33:02 UTC

Severity: minor

Tags: patch

Done: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Bug is archived. No further changes may be made.

Full log


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

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66780 <at> debbugs.gnu.org
Subject: Re: bug#66780: [PATCH] Improve rectangle-mark-mode when
 transient-mark-mode is off
Date: Sat, 28 Oct 2023 14:51:07 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
>> Cc: 66780 <at> debbugs.gnu.org
>> Date: Sat, 28 Oct 2023 12:50:48 +0200

A general question first: Notwithstanding the discussion of how many use
it, do we agree that the combination of using shift-select-mode
_without_ permanent transient-mark-mode ("shift-select-mode-only
scenario") is a supported scenario in Emacs?

Because that's what this bug is about, in the end: Instead of
discouraging the shift-select-mode-only users to use rectangle-mark-mode
I would like to find a solution that helps them.  Without affecting any
other users.  Is that not a valid, probably even noble ambition?

>> Another option would have been to turn off the confusing bits of RMM
>> when *permanent* TMM is off.  I would have preferred that, actually: A
>> rectangle-mark-mode that *really* only shows the region-rectangle when
>> permanent TMM is off but leaves all other functionality (kill, yank, C-x
>> C-x) unchanged.  In that case a conditional minor mode lighter would not
>> be neccessary, either.
>>
>> What do you think about that option?
>
> It would be a backward-incompatible change, so it has even more
> disadvantages IMO.

It would be backward-incompatible only where the behavior currently is
confusing.  For those who use permanent transient-mark-mode nothing
would change.

Another option, not featuring backward-incompatiblity at all but still
helping shift-select-mode-only users: Adding a rectangle-light-mark-mode
that provides the selection capabilities, but not the editing surprises
of rectangle-mark-mode.  The documentation could then provide the
recommendation to use that new mode instead of the other.

>> No poll results available.  But I guess that users coming from other
>> editors could prefer
>>
>>   transient-mark-mode: off
>>   shift-select-mode:   on
>>
>> since this is closer to their previous experience, where the region
>> always deactivates itself as soon as you move the (unshifted) cursor.
>
> I actually think most users want transient-mark-mode turned ON, since
> that is closer what other editors do.

I disagree here.  Other editors do the equivalent of shift-select-mode.
I haven't seen yet an editor that (exaggerating) randomly activates the
region and then leaves it on until you press C-g.

>> Finally, do you also have any objections on fix C, adding the "^"
>> markers to the interactive specs of the movement commands?  Or would
>> that bit be OK?
>
> You never explained why that would be advantageous, nor even what
> effect will that have.

Sorry.  It would have the effect documented for `interactive':

  If the string begins with ‘^’ and ‘shift-select-mode’ is non-nil,
   Emacs first calls the function ‘handle-shift-selection’.

Function `handle-shift-selection' in that case temporarily enables
transient-mark-mode and pushes the mark, which in turn activates the
region-rectangle provided that RMM is enabled.  The effect would be that
I can use the shifted cursor keys to select a region-rectangle even if
transient-mark-mode is not permanently on.  Which I consider
advantageous.




This bug report was last modified 89 days ago.

Previous Next


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