From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: hw Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode as default Date: Thu, 13 Sep 2018 04:58:24 +0200 Organization: my virtual residence Message-ID: <87h8iuhzn3.fsf@toy.adminart.net> References: <83k1nxvm5j.fsf@gnu.org> <87sh2ih0bp.fsf@fastmail.fm> <770f48a8-664a-40ae-8e03-19f6aad248b6@default> <20180910181615.GA4829@ACM> <874lev3bq4.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536812269 14365 195.159.176.226 (13 Sep 2018 04:17:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 04:17:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: spacibba@aol.com, Joost Kremers , Noam Postavsky , emacs-devel@gnu.org, Alan Mackenzie , Eli Zaretskii , phillip.lord@russet.org.uk To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 06:17:44 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 1g0J4W-0003XN-La for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 06:17:40 +0200 Original-Received: from localhost ([::1]:40272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0J6d-0006v5-3w for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 00:19:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0J4N-0005lh-0L for emacs-devel@gnu.org; Thu, 13 Sep 2018 00:17:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0J4L-0005ZV-Pl for emacs-devel@gnu.org; Thu, 13 Sep 2018 00:17:30 -0400 Original-Received: from mo6-p01-ob.smtp.rzone.de ([2a01:238:20a:202:5301::3]:20761) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g0J4J-0005Xy-S4; Thu, 13 Sep 2018 00:17:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1536812246; s=strato-dkim-0002; d=adminart.net; h=References:Message-ID:Date:In-Reply-To:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=SUw8G28ol9YF3Ze2+536nT2nWxaF1lKcJ/3/WTEI2B8=; b=kyc7eXQidRnRWZ5tIYbMlr3FoCvJhUDFTUS5vTwmxBqGkIEmdcXzOWm2CHIn0l+zoF hPiqKO61GV94MYBgaSRCMUZU242TTWD9ISYMcrVk4aTXPmjGI3xGuIKrGMYwqHSa5GZA CeuSqsC38b5SL2CbMWKy+yrgPkNvlyP+jq8XCLQGMO5ZtlrQv6W8wrc3w+CAFX3uC5s2 sRazvK/DgXvYaJ4vSn+So+pEeO5KFQE13TfNCmxMN3K1hjT1SJ0JdxvMf7ed6widgvE8 PNY4WPOzEIzNqH1CMXIdhJC9ihOFvGGzRJ40mVYNWrjqvs0QwPcJdy5km4nMTVGx6wdf risg== X-RZG-AUTH: ":O2kGeEG7b/pS1FS4THaxjVF9w0vVgfQ9xGcjwO5WMRo5c+h5ceMqQWZ3yrBp+AVdIIwXjneEe9k=" X-RZG-CLASS-ID: mo00 Original-Received: from himinbjorg.adminart.net by smtp.strato.de (RZmta 44.0 DYNA|AUTH) with ESMTPSA id e03b99u8D4H5SZQ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 13 Sep 2018 06:17:05 +0200 (CEST) Original-Received: from toy.adminart.net ([192.168.3.55]) by himinbjorg.adminart.net with esmtp (Exim 4.90_1) (envelope-from ) id 1g0J3w-0001h7-T4; Thu, 13 Sep 2018 06:17:04 +0200 In-Reply-To: (Drew Adams's message of "Tue, 11 Sep 2018 17:04:58 -0700 (PDT)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5301::3 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:229733 Archived-At: Drew Adams writes: >> Highlighting regions should be separated from whether they are active or >> not, and I don't want hidden regions, either. > > There are ways to highlight the region without activating it. > You can use one of those (preferably with a different face, > if you also sometimes use an active region).. I'm not sure if that is very useful unless there are multiple regions. > But it's important to highlight the active region. yes >> Currently even when a region is not active (it is a hidden region >> because it is not highlighted), you can do something with it, so users >> always get an "active" region even when they don't want one. It's only >> a bit less active than it is when it is highlighted. > > The "active region" has a well-defined meaning in Emacs. > Don't confuse things by talking about how you can act on > the region when it is not active in the usual sense. That the meaning of "active region" is well defined doesn't seem to prevent inconsistency and confusion. Are there multiple senses in which a region can be active? ;) >> > I feel like region activation by `C-x C-x' was maybe foisted >> > on people who never wanted or expected to do anything >> > with an active region. >> >> Do you mean they would rather do things with hidden regions? I never >> want to do that. > > Not clear, but it sounds like you do want an active region, in the usual > sense, but you want it to be active for only some things, none of which > are type/paste to replace/delete. What I usually do with a region is stuff with it ... i. e. cut/copy and paste it, and I use it to limit (not extend) the effect of functions like query-replace. I also use indent-region, but that always works with a region --- you could see some inconsistency here, too, because with an active region, only indent would be needed which is limited to a region that is active and otherwise work with the whole buffer. Sometimes I use it for whitespace-cleanup, which is also limited to an active region --- another inconsistency is whitespace-cleanup-region. There may be other things I use regions for that doesn't come to mind atm. It might be wrong to call them regions because it's no more than a selection to me. I select a region when I want one and expect it to be forgotten once I did something with it. I do not want hidden regions lurking invisibly in the background, waiting for me to make a mistake so they can suddenly come out of hiding and bite me. Regions do not have anything to do with navigation, and I don't use them for that. I would prefer consistency and selections to act like I want them to, like no delete-selection-mode, no shift-selection, no deletion of regions by arbitrary keystrokes, no de-activating regions by arbitrary keystrokes ... I don't really care about transient-mark-mode. I enabled it a long time ago because with it enabled, selections get finally highlighted like they should be. When I made a selection, it is only logical that functions are limited to the selection, so this special feature of t-m-m isn't a special feature to me. And how would you limit functions to selections otherwise? Whether functions are limited to a selection doesn't have anything to do with how the selection has been made, i. e. whether with t-m-m enabled or disabled. It also doesn't have anything to do with whether a selection is highlighted or not, but when something is selected, it should be highlighted, and when something isn't highlighted, it shouldn't be selected. There are so things entirely unrelated of each other that I now have lost count. Only Emacs makes a mess of them and even throws navigation into the mess. Extending functions to a selection is yet an entirely different issue. You can only limit functions that otherwise work with the whole buffer to a region, and you can only extend functions that do not work with a whole buffer to a region. Transient-mark-mode is supposed to limit functions, not to extend them. To extend functions, a separate mode may be helpful (like you already have d-s-m). >> Use point and mark purely for navigation, set a selection-start-marker >> with C-spc and a selection-end-marker with another C-spc (or whatever >> key binding is appropriate for it). The region is between these >> markers, and you can have multiple regions in the same buffer. Do >> something with a region, and its markers are forgotten unless you use a >> prefix. Have a key binding to jump around between the regions in a >> buffer, and you can tell Emacs with which of them you want to do >> something by moving point into it. If you want to do the same thing >> with multiple regions, move point into one after another and make them >> "sticky" for operation, or mark them right after selecting them. > > Much of what you describe is available with various libraries, including > `zones.el' (https://www.emacswiki.org/emacs/Zones). ... like you describe in your other post, thanks! I need to look into that.