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: visual-region-mode? (was: delete-selection-mode as default) Date: Mon, 10 Sep 2018 13:52:06 +0200 Organization: my virtual residence Message-ID: <877ejuabdt.fsf_-_@toy.adminart.net> References: <83k1nxvm5j.fsf@gnu.org> <877ejxsm18.fsf@toy.adminart.net> <874lf0oul4.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1536581729 10147 195.159.176.226 (10 Sep 2018 12:15:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2018 12:15:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: cpitclaudel@gmail.com, lokedhs@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: charles@aurox.ch (Charles A. Roelli) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 10 14:15:24 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 1fzL66-0002Qq-C2 for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2018 14:15:19 +0200 Original-Received: from localhost ([::1]:51369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzL8C-0006t8-E1 for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2018 08:17:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzL2p-00010y-6P for emacs-devel@gnu.org; Mon, 10 Sep 2018 08:12:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzKz9-0002UK-8n for emacs-devel@gnu.org; Mon, 10 Sep 2018 08:08:08 -0400 Original-Received: from mo6-p02-ob.smtp.rzone.de ([2a01:238:20a:202:5302::3]:17064) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzKz8-0002Rc-ON; Mon, 10 Sep 2018 08:08:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1536581285; 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=/tI6tM50bKdKHn/UkJiEFe+jhH+CgBho9Br9KASUtmo=; b=PWE2Ou1gTNMHthLGfD/hgJ58SU3TsuLLyq2x3twmYxrpC2RgTytdCltU2SaMoDqNhI mXlbd9//spzuNk7sjUak956L3Mw8ic37EW/RP6bvjIlDvEfP4MP43GJ2SIlWARdfIDzp 1ye53dskd2193SSzkUTmpdy0WVekq8UVbiJSAzb3LjDElxS6WxkYRgg9YItfQpKBYLsr 6Z67pSqfvRbuaJ0BBBVl5pb345lrfaNDbcgJXvsgJd+qvKFTufPJudapz71vmFhpY1M6 A1OutwoZe/me327V+WDDPtI/YVIJj770Zozvx5Zm0Qc4qTafFtpiqn6CQzn8gt/GiLsW 383g== X-RZG-AUTH: ":O2kGeEG7b/pS1FS4THaxjVF9w0vVgfQ9xGcjwO5WMRo5c+h5ceMqQWZ3yrBp+AVdIIwXjneEe9k=" X-RZG-CLASS-ID: mo00 Original-Received: from himinbjorg.adminart.net by smtp.strato.de (RZmta 44.0 DYNA|AUTH) with ESMTPSA id e03b99u8AC7wGsH (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); Mon, 10 Sep 2018 14:07:58 +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 1fzKz0-0000xX-3N; Mon, 10 Sep 2018 14:07:58 +0200 In-Reply-To: (Charles A. Roelli's message of "Sat, 08 Sep 2018 21:31:48 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5302::3 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:229616 Archived-At: charles@aurox.ch (Charles A. Roelli) writes: >> From: hw >> Cc: Richard Stallman , cpitclaudel@gmail.com, >> emacs-devel >> Date: Sat, 08 Sep 2018 17:52:07 +0200 >>=20 >> Elias M=C3=A5rtenson writes: >>=20 >> > Without active regions, there would never be an expectation that backs= pace >> > deletes anything but one character. >>=20 >> How come it wasn't distinguished between the concept of a region being >> active and the visual aid of marking a region? > > Separating these two concepts could be useful, > but Emacs would then need some other way of showing the user that a > region is active, Whether regions can be active or not, and whether "active" means that they limit or extend operations to themselves, or both, might depend on settings and doesn't necessarily need to be shown all the time. > like a mode line indicator. Such a mode line indicator would need to show which regions are active when there several and in which way each one of them is active because there are multiple ways of being active. Perhaps it could generally show if any region is active and change when point is within a region to show more of its details. > We would then also need bindings for activating and deactivating the > region, and for turning the visual aid on and off. Another C-spc after starting to mark a region might do to end the marking. What would the advantage of hidden regions be? When something is within a region, it should be highlighted, and when it is no longer highlighted, it should no longer be within a region. Are these hidden regions a remnant of technical limitations that made it advisable not to highlight the selection? Perhaps region selections could be remembered in registers to make it easier to re-create them once they were disabled to suppress the highlighting. >> [...] >>=20 >> I think for the strict-selection-mode I'd prefer, it would help to >> disable transient-mark-mode. But how can I see what I have selected? > > The most common answer to that is to use "C-u C-x C-x", which > temporarily activates the region (thus highlighting it) and exchanges > the point and the mark. But there is no command to turn on the > highlighting of the region directly. Doesn't that enable transient-mark-mode? If I wanted t-m-m, I could just leave it enabled to begin with. I tried with t-m-m disabled, and I don't see what the point of having it disabled is. Regions are not protected any better, and I'd have to be stupid to select a region to do something I want to affect the whole buffer. >> It would even be possible to leave the visual markers active while the >> user is doing something else if transient-mark-mode didn't insist on the >> region being active when it's visually highlighted.=20=20 > > I'd like this too. It could be accompanied by a region-mode in which nothing can be done to and with anything outside of the regions. >> It would only need >> a key binding to stop marking a region. I'd appreciate it if I didn't >> need to always do something with a region immediately and could leave it >> highlighted, or leave several regions highlighted at the same time. > > For a second region, use the secondary selection. We don't yet have > keyboard bindings for its commands, unfortunately, though Drew's > package "second-sel" suggests C-M-y: > > https://www.emacswiki.org/emacs/SecondarySelection#second-sel.el Isn't is easier to use registers instead?