From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode as default Date: Wed, 12 Sep 2018 13:16:02 +0000 Message-ID: <20180912131602.GA5582@ACM> 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; charset=us-ascii X-Trace: blaine.gmane.org 1536758213 21924 195.159.176.226 (12 Sep 2018 13:16:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2018 13:16:53 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: spacibba@aol.com, Joost Kremers , Noam Postavsky , emacs-devel@gnu.org, Eli Zaretskii , Drew Adams , phillip.lord@russet.org.uk To: hw Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 12 15:16:48 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 1g050e-0005YS-I5 for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2018 15:16:44 +0200 Original-Received: from localhost ([::1]:36260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g052l-0007wA-4q for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2018 09:18:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g052e-0007vu-TZ for emacs-devel@gnu.org; Wed, 12 Sep 2018 09:18:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g052Z-0002rS-4v for emacs-devel@gnu.org; Wed, 12 Sep 2018 09:18:48 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:15460 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1g052X-0002me-9g for emacs-devel@gnu.org; Wed, 12 Sep 2018 09:18:42 -0400 Original-Received: (qmail 63882 invoked by uid 3782); 12 Sep 2018 13:18:36 -0000 Original-Received: from acm.muc.de (p5B147121.dip0.t-ipconnect.de [91.20.113.33]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 12 Sep 2018 15:18:35 +0200 Original-Received: (qmail 5935 invoked by uid 1000); 12 Sep 2018 13:16:02 -0000 Content-Disposition: inline In-Reply-To: <874lev3bq4.fsf@toy.adminart.net> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:229699 Archived-At: Hello, hw. On Wed, Sep 12, 2018 at 00:34:11 +0200, hw wrote: > Drew Adams writes: > Highlighting regions should be separated from whether they are active > or not, and I don't want hidden regions, either. I do. I want point and mark, and the region between them to be regarded as "the" region. That's it. I currently (almost) have that option. > 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. As I've pointed out several times in the distant past, the terminology used for things in this part of Emacs is thoroughly suboptimal. A region is never "active"; it never does anything, it is never an agent. For example. > > [...] > > I suspect that things are very different for you, and I > > suspect it is because of `C-x C-x' activating the region > > even though you have no intention of acting on it. > Exchanging point and mark is a purely navigational thing, and somehow > the activation and deactivation of hidden(!) regions .... There's exactly one region, except when there's none (before the mark has been set in a buffer). > .... which may have been modified because point may have moved since a > region was selected last time(!) has been mixed into that. That is ill > advised. No, it's central and essential to how Emacs works. There is ONE region, the part of the buffer between mark and point. Let's not muck around with this. > > 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. I do. I don't want my region highlighted, ever. > Right, so why not separate navigational functions from highlighting and > regions? > 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. > That might make a lot of things much simpler, and we wouldn't have to > feel uneasy about the hidden regions all the time. Simpler? You've got to be kidding! Who really wants to have several regions, and why? I think the times one would want several regions would be so rare as to be pure unjustified complexity. > > [...] > > There you go. That's probably the right thing to do for > > someone who doesn't want d-s-m behavior. But then > > do you have to monkey around with temporary t-m-m, > > or do you just not bother, ever, with having an active > > region? I'm guessing the latter. > It can make it difficult to do things supposed to be limited to a > region. I might disable t-m-m if I could see what I have selected with > it disabled and monkey. Monkey? One of the uses of C-x C-x is to check what is currently in the region. Typically, you'd type it twice, to get back to your starting point. > I never use C-x C-x, so it doesn't make a difference otherwise, which > leaves nothing but disadvantages to having t-m-m disabled. There are many advantages to having transient-mark-mode disabled: primarily simplicity, and the severe reduction in the modal behaviour (in the sense of key sequences doing different things in things like vi's insert mode and command mode). And I'm not happy having my font-locking splatted by the region's highlighting. But everybody's different here, with different preferences, likes, hates. It's a mistake (which I've made quite a few times) to assume that "obvious" options in Emacs actually are obvious. -- Alan Mackenzie (Nuremberg, Germany).