GNU bug report logs - #50038
Permanent shift-select-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 13 Aug 2021 07:15:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 50038 <at> debbugs.gnu.org
Subject: Re: bug#50038: Permanent shift-select-mode
Date: Sat, 14 Aug 2021 09:37:58 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Date: Fri, 13 Aug 2021 10:04:27 +0300
> 
> But when there is a need to extend the region by typing a navigation key
> that is not shift-translated, it abruptly deactivates the region.
> The current default behavior was implemented in such unusable way
> because "other apps" behave the same way.
> 
> So the following patch provides an option for the behavior that is more
> convenient than in "other apps":

Thanks.

> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -6649,9 +6649,15 @@ shift-select-mode
>  by any subsequent point motion key that was not shift-translated, or
>  by any action that normally deactivates the mark in Transient Mark mode.
>  
> +When the value is `permanent', the mark will not be deactivated
> +by any subsequent point motion key that was not shift-translated.

This is a negative description, which tells half of the story, and
leaves it to the reader to guess the other half (how to deactivate the
mark in this case).  How about describing both, and in a positive way?
For example:

  When the value is `permanent', the mark will be deactivated by any
  action which normally does that, but not by motion keys that were
  not shift-translated.

And finally, a question: is it enough to have this as a user option?
That is, what if the user wants this only temporarily, for the next
sequence of commands that extend the region?  Should we perhaps have a
better solution for that use case?  More generally, perhaps this
feature is almost always wanted only for a sequence of commands, never
globally for extended periods of time?  In that case, a user option is
not the best solution; it is better to have some minor mode that could
be turned on and off with a simple key sequence.
>  See `this-command-keys-shift-translated' for the meaning of
>  shift-translation."
> -  :type 'boolean
> +  :type '(choice (const :tag "Off" nil)
> +                 (const :tag "Permanent" permanent)
> +                 (other :tag "On" t))
> +  :version "28.1"
>    :group 'editing-basics)

This would also need a NEWS entry, if we eventually decide to do it
this way.




This bug report was last modified 3 years and 278 days ago.

Previous Next


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