From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Tentative diagnosis of TMM's problem. [Re: Enabling Transient Mark Mode by default] Date: Thu, 21 Feb 2008 09:54:01 -0500 Message-ID: References: <200802171658.m1HGwQ4h011067@sallyv1.ics.uci.edu> <20080219085231.GA1032@muc.de> <200802190938.m1J9ccVg016565@sallyv1.ics.uci.edu> <20080219190127.GA1106@muc.de> <877ih0o9dx.fsf@catnip.gol.com> <20080220200142.GA1979@muc.de> <20080221080536.GA1891@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203605757 12983 80.91.229.12 (21 Feb 2008 14:55:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2008 14:55:57 +0000 (UTC) Cc: rms@gnu.org, Sascha Wilde , lennart.borgman@gmail.com, emacs-devel@gnu.org, juri@jurta.org, dann@ics.uci.edu, storm@cua.dk, Miles Bader To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 15:56:20 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JSCqF-0006jm-SX for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 15:56:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSCpj-0003Ud-ID for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 09:55:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JSCoN-0002SL-RU for emacs-devel@gnu.org; Thu, 21 Feb 2008 09:54:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JSCoN-0002Qu-4D for emacs-devel@gnu.org; Thu, 21 Feb 2008 09:54:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSCoM-0002Ql-Ls for emacs-devel@gnu.org; Thu, 21 Feb 2008 09:54:10 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JSCoF-0002Jd-CG; Thu, 21 Feb 2008 09:54:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFcfvUfO+J2cdGdsb2JhbACQXQEwnwqBAg X-IronPort-AV: E=Sophos;i="4.25,386,1199682000"; d="scan'208";a="14793151" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 21 Feb 2008 09:54:02 -0500 Original-Received: from pastel.home ([206.248.157.156]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id BQX33202; Thu, 21 Feb 2008 09:54:02 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id C7D4A8A26; Thu, 21 Feb 2008 09:54:01 -0500 (EST) In-Reply-To: <20080221080536.GA1891@muc.de> (Alan Mackenzie's message of "Thu, 21 Feb 2008 08:05:36 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89828 Archived-At: >> If you only want to visually highlight a piece of text, you can use >> other packages that do that, like facemenu. > Yes, of course there are workarounds, but that doesn't answer the point. > ;-) Why is toggling the region highlighting not regarded as a command > in its own right? Why can I not, in emacs -Q, highlight the region with > (say) C-x r h? (Hey, that binding, still unused, could hardly be more > appropriate. :-) As mentioned in an earlier message, I find that having to do C-u C-x C-x to activate temporary-TMM is too long already. [ So maybe M-x temporary-transient-mark-mode RET yes RET would be preferable, although partial-completion-mode could still undermine such efforts to force-train my (inexistent) touch-typing. ] >> > I think that if we partitioned TMM into the command `highlight-region', >> > and the other stuff, most of the acrimony on this thread would abate. >> > highlight-region probably deserves its own key binding. >> I don't think it's the right way to cut it. The main issue is with the >> conflation of 2 concepts on the set/push-mark commands: one is to push >> a buffer location on a ring for navigational purposes, the other is to >> set the boundary of the region. > Yes, "issue", but not "problem". This handling of THE mark is essential > to Emacs, and I am convinced it is not coincidental. These 2 mark uses > are not sharply distinct; I often want to go to places in the mark ring > that were originally there for region operation; I often do M-> C-w to > delete the last few lines of a buffer. Were there to be separate marks > for these purposes, Emacs wouldn't be Emacs. The issue is not so much the mark itself as the mark's activation status. Without TMM, the mark is (basically) always activated because it never hurts. Let's think of it as 3 different activation levels: 0 - unset: This state is rare and rather uninteresting. Basically it's only the initial state before the first mark-pushing command. 1 - set: There is a mark, but it's not active, so the region is not highlighted and commands like M-; do not operate on the region. OTOH commands that only operate on the region such as C-w will work, tho. 2 - highlighted: Not only there's a mark but it's active and the region is highlighted. - By default: most mark-setting commands set the mark to 1 and some rare exceptions like C-u C-x C-x and C-SPC C-SPC set the mark to 2. C-g or buffer-edits only brings the mark from state 2 to state 1 and otherwise doesn't change anything. - With TMM without mark-even-if-inactive: all mark-setting commands set the mark to state 2. C-g or buffer-edits only brings the mark to state 0. - With TMM with mark-even-if-inactive: all mark-setting commands set the mark to state 2. C-g or buffer-edits bring the mark to state 1 and otherwise doesn't change anything. So I suggest to close the gap between the previous default and the current default by reverting to the previous default but changing some of the mark-setting commands (I'm thinking mainly of the mark-* commands) to set the state to 2 rather than to 1. Stefan