From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode as default Date: Tue, 18 Sep 2018 19:46:30 +0300 Message-ID: <83in32g3dl.fsf@gnu.org> References: <83k1nxvm5j.fsf@gnu.org> <87sh2ih0bp.fsf@fastmail.fm> <770f48a8-664a-40ae-8e03-19f6aad248b6@default> <20180910181615.GA4829@ACM> <874lev3bq4.fsf@toy.adminart.net> <20180912131602.GA5582@ACM> <87d0tihxzw.fsf@toy.adminart.net> <20180913174640.GB4019@ACM> <8736udkuit.fsf@toy.adminart.net> <20180914104833.GA4103@ACM> <83k1nojgia.fsf@gnu.org> <874leq799e.fsf@toy.adminart.net> <835zz5ie17.fsf@gnu.org> <87musg0wyf.fsf@toy.adminart.net> <83va73f0mv.fsf@gnu.org> <83musegaf2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1537289192 6970 195.159.176.226 (18 Sep 2018 16:46:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Sep 2018 16:46:32 +0000 (UTC) Cc: hw@adminart.net, spacibba@aol.com, joostkremers@fastmail.fm, npostavs@gmail.com, emacs-devel@gnu.org, acm@muc.de, drew.adams@oracle.com, phillip.lord@russet.org.uk To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 18 18:46:27 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2J8r-0001do-CL for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2018 18:46:25 +0200 Original-Received: from localhost ([::1]:41300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2JAx-0007VP-R5 for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2018 12:48:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2JAG-0007VG-Gf for emacs-devel@gnu.org; Tue, 18 Sep 2018 12:47:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2JAF-00015c-HX for emacs-devel@gnu.org; Tue, 18 Sep 2018 12:47:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2J8y-0000oe-07; Tue, 18 Sep 2018 12:46:33 -0400 Original-Received: from [176.228.60.248] (port=4839 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g2J8x-0001m8-Jt; Tue, 18 Sep 2018 12:46:31 -0400 In-reply-to: (message from Yuri Khan on Tue, 18 Sep 2018 22:28:23 +0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229947 Archived-At: > From: Yuri Khan > Date: Tue, 18 Sep 2018 22:28:23 +0700 > Cc: hw@adminart.net, spacibba@aol.com, > Joost Kremers , Noam Postavsky , > Emacs developers , Alan Mackenzie , Drew Adams , > Phillip Lord > > On Tue, Sep 18, 2018 at 9:16 PM Eli Zaretskii wrote: > > > > What changes by delete-selection-mode cannot be worked around by > > > (temporarily) deactivating the region? > > > > Deactivating the region makes it disappear from view, which I think we > > should avoid. Users will not expect the region to disappear. > > Moreover, this is currently impossible, because your fictional C-S-g > > command doesn't exist. > > Well, your hypothetical “disable-delete-selection-mode-temporarily” > does not exist either. Of course, it isn't. We are discussing what should we add to Emacs to make such actions possible. And my point is that as long as we are adding a feature, it would be better if it did not deactivate region, because doing so have certain disadvantages. > > If we are going to introduce a command for temporarily disabling or > > re-enabling the region, we had better do it without making it > > disappear from display, IMO. > > As a user of transient-mark-mode, shift-select-mode and > delete-selection-mode, I’d expect to be among the target audience for > this facility being discussed. But, strangely, I very rarely find > myself in a situation where I have an active region that I want to > preserve for later while wanting to type something. I am certainly > okay with temporarily deactivating the mark and the region > highlighting, if I know I’ll be easily able to re-activate it. Then perhaps we should have 2 variants of such a command, one that deactivates the region and another that doesn't. > How would a command to temporarily suspend delete-selection-mode work? > I assume the user will have to press at least one key to invoke it. > Then, I expect there will be an unpredictable sequence of self-insert > and/or yank and/or other editing commands, so the user will also > indicate the moment when he/she wants delete-selection-mode back. At > this point, it is not going to be any more efficient than just binding > delete-selection-mode to an easy key or binding C-S-g to (lambda () > (interactive) (activate-mark)); each of these takes one keypress > before and one keypress after typing-without-replacing-selection. It is not more efficient, but leaving the region highlighted might be preferable for use cases you don't care about. > Also, a user who enables and disables d-s-m often would need some kind > of indication of its current status — either a modeline lighter or a > special face for the region when it is active but will not be replaced > by typing. Agreed.