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: Wed, 19 Sep 2018 21:22:29 +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> <87k1nm7eit.fsf@toy.adminart.net> <878t403dn5.fsf@toy.adminart.net> <878t3yv0p0.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537384723 20378 195.159.176.226 (19 Sep 2018 19:18:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2018 19:18:43 +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 Wed Sep 19 21:18:39 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 1g2hzi-0005Ck-V5 for ged-emacs-devel@m.gmane.org; Wed, 19 Sep 2018 21:18:39 +0200 Original-Received: from localhost ([::1]:46980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2i1p-00076Y-JJ for ged-emacs-devel@m.gmane.org; Wed, 19 Sep 2018 15:20:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2i1h-00075R-1L for emacs-devel@gnu.org; Wed, 19 Sep 2018 15:20:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2i1c-0003L2-4v for emacs-devel@gnu.org; Wed, 19 Sep 2018 15:20:40 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:51119) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g2i1b-0002w4-Ez for emacs-devel@gnu.org; Wed, 19 Sep 2018 15:20:36 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 41DDF22865 for ; Wed, 19 Sep 2018 19:24:12 +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=1537385050; x=1538249051; bh=hWpIbey6mth+Z 5A1vuNSI+MIlo7CZ6F8AShstjHwsZ4=; b=VIMYtd/RY2nxTIoEF0YpZVdDAKJ5B uxbAHA2elRQD2cPX7CkUio3kt3zSB5vuOAYINv22vCuqBxrLELd0CQRO2z1UUimi 1o8ndDaDPw5ySaEVNpO7xFYmj7WoYuPvh9JJlU7t0ZRL0zmjolqZnmtBz++M9WL7 vkq0p+RAXX8Yh8= 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 uIAoD7x4W5_t for ; Wed, 19 Sep 2018 19:24:10 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 5691522846; Wed, 19 Sep 2018 19:24:10 +0000 (UTC) In-reply-to: <878t3yv0p0.fsf@toy.adminart.net> (message from hw on Wed, 19 Sep 2018 03:45:23 +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:229968 Archived-At: > From: hw > Date: Wed, 19 Sep 2018 03:45:23 +0200 > > >> Having clarified which operations can be used with a region doesn't mean > >> that working with a region can be efficiently done. > > > > It does for me. For example, see the output of M-x -region TAB. By > > just knowing a smidgeon of these commands, you can work very > > efficiently with a region, with all the documentation and help Emacs > > provides. > > That's like saying it doesn't matter how inefficient a procedure is if > you only have some instructions to perform it. When these instructions are so simple, they cannot help being efficient. But if you reject the main building block they use (the region, active or not), then it makes sense that you find them inefficient. > > If we somehow "disarm" the region by default (as you have > > suggested), the use of all these commands would be less efficient. > > That was Elis idea, and it doesn't refer to commands implying "region" > but, IIUC, to how to deal with that users might sometimes want to delete > a region by inserting characters and sometimes not. Ok. > Well, I have delete-active-region and mark-even-if-inactive set to nil > and am testing this: > > > (defun my-exchange-point-and-mark (&optional arg) > "Put the mark where point is now, and point where the mark is > now. With a prefix argument, toggle the activeness of the > region. > > This function itself is ignorant of `transient-mark-mode'." > (interactive "P") > (let ((omark (marker-position (mark-marker)))) > (if (null omark) > (user-error "No mark set in this buffer")) > (set-marker (mark-marker) (point)) > (goto-char omark)) > (if arg > (if mark-active (deactivate-mark) > (activate-mark t)))) > > > Now I have the region fortified and am able to use the mark for > navigation without making (or unmaking) a selection from the region > unless I actually want to. Ok. If you decided to turn "t-m-m" off, though, how would you use "my-exchange-point-and-mark" to ever activate the mark again? In order for the region to be considered active, "t-m-m" has to enabled (if only temporarily), hence the current wrangling in "exchange-point-and-mark" to turn it on temporarily when the user asks for it.