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: Enabling Transient Mark Mode by default Date: Thu, 21 Feb 2008 12:18:20 -0500 Message-ID: References: <87myq4saw1.fsf@catnip.gol.com> <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> <86lk5f4fjb.fsf@timbral.net> <87ejb7babz.fsf@xmission.com> <85lk5fcod6.fsf@lola.goethe.zz> <87ablvb4om.fsf@xmission.com> <85lk5fb3ym.fsf@lola.goethe.zz> <8763wjb0nk.fsf@xmission.com> <864pc2tyw0.fsf@lola.quinscape.zz> <86zltuqsmn.fsf@lola.quinscape.zz> <86r6f6qnqy.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203614483 15776 80.91.229.12 (21 Feb 2008 17:21:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2008 17:21:23 +0000 (UTC) Cc: Evans Winner , Jason Earl , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 18:21:46 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 1JSF77-0001vB-IS for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 18:21:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSF6c-00044Y-Ct for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 12:21:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JSF4z-0002Pj-0m for emacs-devel@gnu.org; Thu, 21 Feb 2008 12:19:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JSF4w-0002Oi-LI for emacs-devel@gnu.org; Thu, 21 Feb 2008 12:19:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSF4w-0002Oa-D0 for emacs-devel@gnu.org; Thu, 21 Feb 2008 12:19:26 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JSF4s-0006WS-BF; Thu, 21 Feb 2008 12:19:22 -0500 Original-Received: from ceviche.home (vpn-132-204-232-86.acd.umontreal.ca [132.204.232.86]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m1LHJKtC023094; Thu, 21 Feb 2008 12:19:21 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id D1882B41A8; Thu, 21 Feb 2008 12:18:20 -0500 (EST) In-Reply-To: <86r6f6qnqy.fsf@lola.quinscape.zz> (David Kastrup's message of "Thu, 21 Feb 2008 17:26:45 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-NAI-Spam-Score: -2.5 X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:89841 Archived-At: >> What do you think of making C-M-SPC (and a few other such mark-* >> commands) turn on temp-TMM? > Sounds sensible to me for this one. Here's the list: M-x mark- TAB mark-defun mark-end-of-sentence mark-page mark-paragraph mark-sexp mark-whole-buffer mark-word Would you obect to have them all set temp-TMM? > I think that things like delete-selection-mode should _not_ switch on > permanent transient-mark-mode, by the way: they would appear also > useful with temporary transient-mark-mode, and it is a pity that one > can't use them with it. Agreed. It made sense to do it back when temp-TMM didn't exist (since del-sel-mode needs either temp-TMM or TMM to be of any use), but not any more. Same for cua-selection-mode and pc-selection-mode, I guess (tho these would need to be tweaked so that they properly activate the mark in temp-TMM). Stefan PS: BTW, the current TMM implementation is odd and inconvenient. I think the activation/highlighting status of the mark needs to be determined solely from mark-active, and the transient-mark-mode variable should only affect how mark-active is changed. I.e. we should change `mark-active' to accept more than 2 values: it can be nil (unset), t (set but not highlighted), `highlighted', and maybe also `highlight-once' (this corresponds to the `once' setting of TMM used for mouse operations so that the mark is only highlighted for 1 operation so even just moving point will dehighlight it). Or maybe just nil or a number (the number is decremented after every command and if it is positive it means that the mark is highlighted: 1=highlight-once, 0=t, most-positive-fixnum=highlighted). Then TMM and mark-even-if-inactive are only consulted when activating/deactivating the mark to know to what to (re)set mark-active. Problem is: this would be backward-incompatible because of code that does (and mark-active transient-mark-mode) and would hence be confused when the mark is set but not highlighted.