From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.devel Subject: Re: visual-region-mode? (was: delete-selection-mode as default) Date: Wed, 12 Sep 2018 20:31:51 +0200 Message-ID: References: <83k1nxvm5j.fsf@gnu.org> <877ejxsm18.fsf@toy.adminart.net> <874lf0oul4.fsf@toy.adminart.net> <877ejuabdt.fsf_-_@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536776948 16181 195.159.176.226 (12 Sep 2018 18:29:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2018 18:29:08 +0000 (UTC) Cc: hw@adminart.net, cpitclaudel@gmail.com, lokedhs@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 12 20:29:03 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 1g09st-00044x-3d for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2018 20:29:03 +0200 Original-Received: from localhost ([::1]:37862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g09uz-0002jX-E8 for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2018 14:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g09uE-0002hY-Bi for emacs-devel@gnu.org; Wed, 12 Sep 2018 14:30:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g09uD-0000L9-KG for emacs-devel@gnu.org; Wed, 12 Sep 2018 14:30:26 -0400 Original-Received: from sinyavsky.aurox.ch ([2a03:2040:2:1b::1]:54954) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g09uD-00008e-C7 for emacs-devel@gnu.org; Wed, 12 Sep 2018 14:30:25 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 5E85A22857 for ; Wed, 12 Sep 2018 18:33:51 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1536777230; x=1537641231; bh=LquIVEG7KT+qf CcFP4O+Y+giOcgSGpbBkE4rBz7bcyk=; b=cpi2QpyN6VqpUeEPH3XtteDVL4u77 NLbyZe+SsZV2MHfUfQPdT2e57JvWY7e9oUCjpSQxahdeHOo3L2EOqz+NSUWgNos7 rPken+vqd1kHNDp6OKQy9c/4gAEhH23T7KlhkuKwJBiAKCILCPZ2iu8EmBlSLRSm QoWcPM0May8wIw= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BItzThtalYaF for ; Wed, 12 Sep 2018 18:33:50 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id DC3842283D; Wed, 12 Sep 2018 18:33:49 +0000 (UTC) In-reply-to: (message from Yuri Khan on Wed, 12 Sep 2018 12:12:26 +0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a03:2040:2:1b::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:229720 Archived-At: > From: Yuri Khan > Date: Wed, 12 Sep 2018 12:12:26 +0700 > > > > A consistent definition of a transient region would make the mark also > > > buffer-and-window-local, so that buffer B in windows X and Y could > > > have completely independently marked regions. > > > > In that case, pushing a mark in window X, then switching to window Y > > and popping the mark would not necessarily place point where the mark > > was pushed in window X, since window Y might have its own mark. That > > could be surprising behavior. The handling of the mark-ring would > > also be complicated. > > I thought about it some more. > > We have a notion of mark that is somewhat overloaded. On the one hand, > there is the mark ring and the global mark ring whose purpose in life > is to help the user navigate back to positions they visited earlier. > On the other hand, the mark is used as one of the two delimiters of > the region. > > It seems to me these two uses of the mark are mutually disjoint, and > it might be a better model if they were decoupled. The mark ring and the region are even more tightly coupled: C-u C-SPC not only jumps to the mark, it also sets the mark from the most recent mark on the mark ring, effectively restoring the previous region. It could be called the "region ring". And since it so happens that the boundaries of "regions" are often places of interest to the user, maybe it makes good sense to combine these two uses of the mark as delimiter of the region, and the mark as a navigational buoy.