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? Date: Thu, 13 Sep 2018 22:42:24 +0200 Message-ID: References: <83k1nxvm5j.fsf@gnu.org> <877ejxsm18.fsf@toy.adminart.net> <874lf0oul4.fsf@toy.adminart.net> <877ejuabdt.fsf_-_@toy.adminart.net> <878t473dhg.fsf@toy.adminart.net> <87pnxii2b7.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536871165 10791 195.159.176.226 (13 Sep 2018 20:39:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 20:39:25 +0000 (UTC) Cc: cpitclaudel@gmail.com, lokedhs@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: hw Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 22:39:21 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 1g0YOW-0002gc-8v for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 22:39:20 +0200 Original-Received: from localhost ([::1]:44240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0YQc-0002ry-Fb for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 16:41:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0YQT-0002ri-Jw for emacs-devel@gnu.org; Thu, 13 Sep 2018 16:41:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0YQL-00034S-P8 for emacs-devel@gnu.org; Thu, 13 Sep 2018 16:41:19 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:46609) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g0YQG-0002dH-OH for emacs-devel@gnu.org; Thu, 13 Sep 2018 16:41:09 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id B457122855 for ; Thu, 13 Sep 2018 20:44:30 +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=1536871469; x=1537735470; bh=w7QFMVpP4fAjf WstkQc2txdvathqljBRwGDZKtaxxD8=; b=ZfuqUHQ89WQ9/2nPQkkuro2hiZWlr dkOmv0Di/00iNoB7U4ALKIYeGHPI3OBpjeoIOznK0FASz6Nne87+B33HxKwBoTh8 qp4cNa0gGcebhHJY5T5EH3kvMQvnQW0owg+0j7FFIUHTGbeIhZMwz5C7oVc8s3DB Z1KYy4gD4dIb2E= 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 ygMrROEK85pm for ; Thu, 13 Sep 2018 20:44:29 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 10D2F2283D; Thu, 13 Sep 2018 20:44:28 +0000 (UTC) In-reply-to: <87pnxii2b7.fsf@toy.adminart.net> (message from hw on Thu, 13 Sep 2018 06:00:32 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 37.35.109.145 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:229761 Archived-At: > From: hw > Date: Thu, 13 Sep 2018 06:00:32 +0200 > > What is efficient about hidden regions the way they are? The region has a simple definition, and the commands using the region are well-marked (e.g. "kill-region", "fill-region", "eval-region", ...). > When I want a region, i. e. a selection, I go where I want > it and select what I want. No need, you have the mark already. ;) > And there is no way to show the mark? Besides the ways already mentioned, no. As Alan has suggested, it becomes second nature to keep its position in your head. And if you want to know how far away it is from point (as a reminder), there is the key M-= (or ESC =). > The only purpose of the mark is to make a selection. After the > selection has been used, editing moves on, and the location has become > irrelevant. Sometimes yes, sometimes no. Better to err on the side of caution, than to forget all previous marks (as other programs do). > >> That I move around in a file as I see fit while reading or editing it > >> doesn't have anything to do with regions I might select to do something > >> with. I might highlight a selection to make parts of source code stick > >> out as a reminder because they need to be fixed or worked upon in some > >> particular order. I could use registers and/or bookmarks instead, but > >> it would be much more convenient to use highlighting and perhaps to be > >> able to jump through the selections. > > > > This would be a good use case for registers storing regions, I think. > > The mark ring is a useful tool, but it does not give easy, random > > access to all previous selections. We need a bug report for this. > > A feature request for the possibility of having multiple regions that > can be highlighted, first decoupling making selections from navigation, > might be an option. I'm not sure if further discussion before making > such a request is better because there might be pretty strong resistance > against this from everyone used to and using things the way they have > been for a long time --- and maybe we're missing something. I make a less ambitious suggestion: get registers to store regions (i.e., two markers). Then we can add functions to highlight them, set one of them as the "active region", and otherwise operate on them, either individually or as a set -- a bit like the "zones" Drew has detailed.