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: Sun, 16 Sep 2018 05:15:01 +0200 Organization: my virtual residence Message-ID: <87in363zgq.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> <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> <205df9be-2e5c-4cc4-a13a-7c80eb63bedc@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537067693 12513 195.159.176.226 (16 Sep 2018 03:14:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2018 03:14:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: spacibba@aol.com, joostkremers@fastmail.fm, npostavs@gmail.com, emacs-devel@gnu.org, Yuri Khan , acm@muc.de, Eli Zaretskii , phillip.lord@russet.org.uk To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 16 05:14: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 1g1NWJ-000384-S0 for ged-emacs-devel@m.gmane.org; Sun, 16 Sep 2018 05:14:48 +0200 Original-Received: from localhost ([::1]:57511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1NYQ-0007un-GL for ged-emacs-devel@m.gmane.org; Sat, 15 Sep 2018 23:16:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1NWw-0007Db-WA for emacs-devel@gnu.org; Sat, 15 Sep 2018 23:15:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1NWv-0008DE-MN for emacs-devel@gnu.org; Sat, 15 Sep 2018 23:15:26 -0400 Original-Received: from mo6-p01-ob.smtp.rzone.de ([2a01:238:20a:202:5301::6]:16961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1NWv-00086c-6H; Sat, 15 Sep 2018 23:15:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1537067723; 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=s9K8XhEbN7juCNQjgx30IvV+eU9C9TeaLxLIhXDnw/Q=; b=E2ex21nlbR72ieWujuKdOMCLCb6yUsW5GBCZEke38H0iWzyWoApFjg9/WLFMUiF+FZ vorNZNYlav9ZHJ0xFAH747bO9tfTtd0ySXL66dw/okpVD41NvE/uI3Zt853z4/2HWpur SHtPy5+eZmip9rkJrT3/Z/DR2dQXSbNOHrQpSzkO5RM+ok+2vwHaN0+2/0Ns8f9Mml35 KooqcepM4SC3TjvlbaMXK9fWBuRKp6lhITsNYlQD+LKl4mvgFBp9r3hdn5j9I9ZXUO4T +e/aQ+HoTrjkKM/j+FlIstxE3MF4BNKFK43B131IPmxWUGhDH21UoxWND7O8volhwusg DaaQ== X-RZG-AUTH: ":O2kGeEG7b/pS1FS4THaxjVF9w0vVgfQ9xGcjwO5WMRo5c+h5ceMqQWZ3yrBp+AVdIIwXjneEe9k=" X-RZG-CLASS-ID: mo00 Original-Received: from himinbjorg.adminart.net by smtp.strato.de (RZmta 44.1 DYNA|AUTH) with ESMTPSA id 20bdb7u8G3FB6GB (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); Sun, 16 Sep 2018 05:15:11 +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 1g1NWg-0001UA-J5; Sun, 16 Sep 2018 05:15:10 +0200 In-Reply-To: <205df9be-2e5c-4cc4-a13a-7c80eb63bedc@default> (Drew Adams's message of "Sat, 15 Sep 2018 17:22:39 -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::6 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:229837 Archived-At: Drew Adams writes: >> You don't need a region for commands to work on, a selection is enough. >> >> That would allow to decouple navigation from (making) selections, and >> the concept of a region becomes obsolete, removing all the entanglement >> and greatly simplifying things. > > In case there are others who, like me, did not completely get this > point from Hw, though he touched on it several times - Imagine Emacs without a region. Mark and point still exist, only there is no region. > [...] > What is it about the secondary selection that makes me > think that it is like what Hw describes? This: unlike the > Emacs region, there is no requirement that either end > of the selection be visible, i.e. on the screen, even when > you act on it. By contrast, by design the Emacs region > always has the cursor end of the region, i.e., point, on > the screen. This would be relevant for multiple selections because some of them might not be visible in a window/on screen. That's something you can't do with the secondary selection. I wasn't even aware that this might be difficult to understand because it is so fundamental with the Emacs region that one end of it is always visible. > [...] > And maybe it helps Hw understand a bit more about the > Emacs behavior, which absolutely requires that the cursor > end of the region always be visible in the visible part of the > screen. I never thought about that before you mentioned it. It seems quite natural when there is only one selection because I have no desire to scroll something off the screen I'm working with right now. Did you ever try joe? I haven't used it in years, but it usually comes with the distribution, so you might be able to try it, too. If you do, C-k h shows help. In joe, you make a selection by pressing C-k b to mark the beginning and C-k k to mark the end of the selection. The selection is called a block in joe. It is highlighted. You can change it any time by setting the marks again. Now you can copy the block with C-k c, meaning the whole block is inserted at point, and the copy is the new selection. The beginning and the end of a block (selection) can both be off screen. You can move around, and the block stays enabled and highlighted (Why can't Emacs do that?). When you delete the block, the block is gone and the start marker is being remembered. You can set a new end marker to create a new block without setting a new start marker. You can probably do more stuff with it, but it doesn't matter here. So there are a few things to note: + start and end marker of a selection do not need to be visible + the selection is entirely independent from navigation + the selection is persistent + the start marker is being remembered after the selection has been used + I can move, type and edit normally without endangering the selection as if it wasn't there And it is what I basically do with selections: I just make them when and where I need them. Only Emacs won't really let me do this because it forces me to drag this dreadful useless region around all the time. On top of that, some functions work with the region by either being limited to it or by being extended to it when it is highlighted while others work with the region when it's not highlighted, and it all depends on various modes and variables until nobody really knows anymore what it all does under what circumstances. Ok, Emacs is a bit more complicated than joe, but seriously? It's not all that different because you make a selection and then do stuff with it. Only Emacs makes this terrible with its inflexible and overloaded paradigm of "the region" which can be hidden, active or both in various ways, and is apparently important to some users even for navigation. But it can't really get much simpler, more obvious, more efficient and easier to use then in joe. Joe also protects my by not having a hidden region all the time, and I'm not going to loose the selection by mistake. Drew won't like it because there is no delete-selection-mode; I like it because there is none (or maybe there is and I don't know about it). > And yes, perhaps that basic Emacs tenet of keeping the > cursor visible is partly rooted in the emphasis Emacs gives > to the keyboard, and in its origin before the widespread > use of pointing devices (mouse). > > In that context you pretty much always want the insertion > point (aka text cursor) to be visible. You are not typically > selecting text with a mouse and then acting on it. The cursor is always visible in joe. That doesn't mean that a selection can not be persistent or that its end must always be visible. This is an Emacs problem because sticking to "the region" makes Emacs inflexible. I can imagine that this inflexibility may have been a reason for abusing the mark for navigation: What else can you do when you have no choice but to always stick to a fake selection ("the region") and aren't free to move around? Later the inflexibility brought someone to create transient-mark-mode, and it couldn't go all the way because Emacs remained tied up by its region. After some more evolution, Emacs is still being held back by its region ... I really hope you have a chance to try out joe, it might make what I'm trying to say much easier to understand. I'm not saying Emacs should be entirely the same as joe, they are too different for that --- only that this is an example of what I'm trying to say which you can try out --- and having it like that in Emacs in an Emacs-compatible way would be really cool.