unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 50038@debbugs.gnu.org
Subject: bug#50038: Permanent shift-select-mode
Date: Sat, 14 Aug 2021 09:37:58 +0300	[thread overview]
Message-ID: <83lf54bkft.fsf@gnu.org> (raw)
In-Reply-To: <87czqif4y5.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 13 Aug 2021 10:04:27 +0300)

> From: Juri Linkov <juri@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.





  parent reply	other threads:[~2021-08-14  6:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  7:04 bug#50038: Permanent shift-select-mode Juri Linkov
2021-08-13 12:06 ` Lars Ingebrigtsen
2021-08-14  6:37 ` Eli Zaretskii [this message]
2021-08-15  8:37   ` Juri Linkov
2021-08-15  9:36     ` Eli Zaretskii
2021-08-15 16:19       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lf54bkft.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=50038@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).