From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50038: Permanent shift-select-mode Date: Sat, 14 Aug 2021 09:37:58 +0300 Message-ID: <83lf54bkft.fsf@gnu.org> References: <87czqif4y5.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5764"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50038@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 14 08:39:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEnK3-0001J8-Ae for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Aug 2021 08:39:11 +0200 Original-Received: from localhost ([::1]:57450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEnK1-0003Yb-FC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Aug 2021 02:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEnJu-0003YK-0A for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 02:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEnJt-0003m6-Pr for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 02:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEnJt-0002hl-Kx for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 02:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Aug 2021 06:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50038 X-GNU-PR-Package: emacs Original-Received: via spool by 50038-submit@debbugs.gnu.org id=B50038.162892310610356 (code B ref 50038); Sat, 14 Aug 2021 06:39:01 +0000 Original-Received: (at 50038) by debbugs.gnu.org; 14 Aug 2021 06:38:26 +0000 Original-Received: from localhost ([127.0.0.1]:43451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEnJF-0002gs-4X for submit@debbugs.gnu.org; Sat, 14 Aug 2021 02:38:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEnJ9-0002gc-Ug for 50038@debbugs.gnu.org; Sat, 14 Aug 2021 02:38:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43702) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEnJ3-000373-IH; Sat, 14 Aug 2021 02:38:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4534 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEnJ3-0004Q3-1J; Sat, 14 Aug 2021 02:38:09 -0400 In-Reply-To: <87czqif4y5.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 13 Aug 2021 10:04:27 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211805 Archived-At: > From: Juri Linkov > 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.