From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode as default Date: Sat, 15 Sep 2018 02:29:05 +1200 Message-ID: <6cf1bdfc-5577-7094-dc53-ad6b52ff2535@orcon.net.nz> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1536935251 11980 195.159.176.226 (14 Sep 2018 14:27:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2018 14:27:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: hw@adminart.net, spacibba@aol.com, Joost Kremers , Noam Postavsky , Emacs developers , Alan Mackenzie , Eli Zaretskii , Drew Adams , Phillip Lord To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 14 16:27:26 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 1g0p49-00030K-Pd for ged-emacs-devel@m.gmane.org; Fri, 14 Sep 2018 16:27:25 +0200 Original-Received: from localhost ([::1]:51971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0p6G-0003Ez-0Q for ged-emacs-devel@m.gmane.org; Fri, 14 Sep 2018 10:29:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0p67-0003Eq-1P for emacs-devel@gnu.org; Fri, 14 Sep 2018 10:29:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0p66-0000CV-De for emacs-devel@gnu.org; Fri, 14 Sep 2018 10:29:26 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:60432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0p60-0008Jr-Dc; Fri, 14 Sep 2018 10:29:21 -0400 Original-Received: from [150.107.172.72] (port=11623 helo=[192.168.20.103]) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1g0p5l-0001bo-QR; Sat, 15 Sep 2018 02:29:06 +1200 In-Reply-To: Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 60.234.4.44 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:229780 Archived-At: On 15/09/18 01:41, Yuri Khan wrote: > I was one of two people here to suggest that it is a bad thing > that the mark is used both as a navigation mechanism and as a > region delimiter I think it's impractical to suggest that all code which acts on the region should be modified to only do so if the region is active. The only approach I can think of is to have the mark forcibly set to nil whenever the region is inactive, so that commands which want to use the region will fail. I suspect that would mean giving up all use of the mark ring too -- but you could implement a custom equivalent for the purposes of navigation. Maybe play with something like this: (defun my-clear-inactive-mark () (unless (region-active-p) (set-mark nil))) (add-hook 'pre-command-hook 'my-clear-inactive-mark) -Phil