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 17:14:25 +0300 Message-ID: <83musegaf2.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> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537280092 8156 195.159.176.226 (18 Sep 2018 14:14:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Sep 2018 14:14:52 +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 16:14:47 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 1g2Gm6-0001xc-Om for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2018 16:14:46 +0200 Original-Received: from localhost ([::1]:40578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2GoD-0005EL-9D for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2018 10:16:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2Gn8-0005E5-Eb for emacs-devel@gnu.org; Tue, 18 Sep 2018 10:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2Gn5-0006QA-AV for emacs-devel@gnu.org; Tue, 18 Sep 2018 10:15:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2Gly-0004dx-S4; Tue, 18 Sep 2018 10:14:38 -0400 Original-Received: from [176.228.60.248] (port=2597 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g2Glx-0000gB-9t; Tue, 18 Sep 2018 10:14:38 -0400 In-reply-to: (message from Yuri Khan on Tue, 18 Sep 2018 20:14:41 +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:229941 Archived-At: > From: Yuri Khan > Date: Tue, 18 Sep 2018 20:14:41 +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 7:32 PM Eli Zaretskii wrote: > > > No, I mean delete-selection-mode changes the effects of some commands > > in ways that could be very inconvenient in some situations, and > > currently the only way for the user to deal with such conflicts is by > > turning on or off delete-selection-mode. There should be a better way > > of temporarily enabling/disabling delete-selection-mode, similar to > > what we have for transient-mark-mode. > > 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. > Initial state: some text before point is selected. We want to insert > some text without replacing the selection. > > C-g C-S-g > > Result: the same text + newly typed text is selected. 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. But in general, yes, that's the idea: introduce a state of the region whereby delete-selection-mode is temporarily suspended.