From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Earl Newsgroups: gmane.emacs.devel Subject: Re: Enabling Transient Mark Mode by default Date: Wed, 20 Feb 2008 17:42:23 -0700 Message-ID: <8763wjb0nk.fsf@xmission.com> References: <87myq4saw1.fsf@catnip.gol.com> <878x1ov227.fsf@jurta.org> <878x1os6mt.fsf@catnip.gol.com> <47B39231.8010108@gmail.com> <200802151711.m1FHB3Y3008798@sallyv1.ics.uci.edu> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203554569 30853 80.91.229.12 (21 Feb 2008 00:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2008 00:42:49 +0000 (UTC) Cc: Evans Winner , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 01:43:13 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 1JRzWq-0004E6-G9 for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 01:43:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRzWL-0000SA-NI for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 19:42:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRzWH-0000QK-I4 for emacs-devel@gnu.org; Wed, 20 Feb 2008 19:42:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRzWG-0000OP-LF for emacs-devel@gnu.org; Wed, 20 Feb 2008 19:42:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRzWG-0000O5-Cz for emacs-devel@gnu.org; Wed, 20 Feb 2008 19:42:36 -0500 Original-Received: from out02.mta.xmission.com ([166.70.13.232]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRzWC-0003Wy-4S; Wed, 20 Feb 2008 19:42:32 -0500 Original-Received: from [166.70.13.201] (helo=mgr1.xmission.com) by out02.mta.xmission.com with esmtp (Exim 4.62) (envelope-from ) id 1JRzWH-0007ce-BD; Wed, 20 Feb 2008 17:42:37 -0700 Original-Received: from jearl.fttp.xmission.com ([166.70.233.10] helo=workhorse.earlhome) by mgr1.xmission.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1JRzWA-0007zA-3z; Wed, 20 Feb 2008 17:42:30 -0700 Original-Received: from nat.visiongrp.com ([65.162.166.20] helo=jearl-laptop) by workhorse.earlhome with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JRzW9-0005jT-Uu; Wed, 20 Feb 2008 17:42:30 -0700 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAACXBIWXMAABKbAAASmwHgklkM AAABz0lEQVRIx5VW2bHDIAz0jPtRS+pxG1E/fEUHhzjeC2EcJ8JZ0LFa80AkrrgB6L/0K0ypc3Y9 UqYh0I9eOtzG8hwPdkARJiJmOQBk20Ft0OuDcANA/78jdpd2AL99sFy4NDbQLVrsCbAEXYA3DVzE 8D/gkNbJpZsdhHMMN2kdAOKrSo8ttNZrTrYdnEgVweWu0p5b5vjrwSXxoSv73dIibaoSu/4u/vyB sxyD/9YCiE7IRrOP9M4uSK1OrcgOkANA2+PVBsHfQU8AbafRH8e0LoBUSDn2w+JiJiOXi6AngBx7 erYTF42M3wDYAFvH/erSGlNZg/7q0s9pLR1xLNyJGqo8xo2Qzm918AW0etoeQcMHldaDz43STnru k9Lo3XslGgeLidQ/Is0l3bJKkDQ71L7GZGY8DqlEF4l4oSQRMIBQT5JnadSSom8nmZEk/xxinLSR XcgoUyHhbQ8DZHZh1la298tKDaF5ZhXjjd6YALvczwB1SX4CWOGWGGRySQ79kGesmtNLUdOUFkDU gceCp9cuEj6ogYbgqHSzyYW59MKY9EUDqbrTyyGF6eiA2g+6gtoUZKr90A8jlXzL4STZTz3aoN3Q zkNx7unnn3YC+gA3WfRuzLleFgAAAEV6VFh0Q29tbWVudAAAeNpT8MxNTE9VSE/NSy1KLElNUUiq VHD3C1Vwz8gvLilOLsosKFHQSEkty0xOtS3Iyy1KLNfkAgDinBJPV21RsgAAABp6VFh0SlBFRy1D b2xvcnNwYWNlAAB42jMEAAAyADKxisffAAAAInpUWHRKUEVHLVNhbXBsaW5nLWZhY3RvcnMAAHja M6wwBAABtwDbWB23uwAAAABJRU5ErkJggg== In-Reply-To: <85lk5fb3ym.fsf@lola.goethe.zz> (David Kastrup's message of "Thu, 21 Feb 2008 00:30:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Received-SPF: neutral (mgr1.xmission.com: 166.70.233.10 is neither permitted nor denied by domain of xmission.com) client-ip=166.70.233.10; envelope-from=jearl@xmission.com; helo=workhorse.earlhome; X-SA-Exim-Connect-IP: 166.70.233.10 X-SA-Exim-Mail-From: jearl@xmission.com X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mgr1.xmission.com) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:89757 Archived-At: David Kastrup writes: > Jason Earl writes: > >> Yes, I agree that transient-mark-mode works somewhat differently than >> most text editors. However, without transient-mark-mode Emacs is >> *remarkably* different than other editors. More importantly, >> transient-mark-mode helps give the newbie clues as to how setting the >> region works in Emacs. Think of it as training wheels for region >> marking. >> >> Without those visual clues it is easy for even the experienced Emacs >> user to forget where the mark is. Of course, the experienced Emacs >> user has read the manual and knows about C-x C-x and friends. > > You don't need to read the manual. The tutorial is sufficient as are > the help sheets. And without learning at least some basics, Emacs is > not going to be fun. > >> The newbie, on the other hand, doesn't have a clue about these >> keystrokes. As far as they are concerned Emacs is simply too >> old-fashioned to do something sensible like highlight the region they >> are marking. To make matters worse the new user is in for a surprise >> when they try to actually use the "invisible" region that they are >> trying to mark because, as you point out, it is likely to work >> differently than they expect. At least with transient-mark-mode Emacs >> gives the user some visual clues that can help the new user figure out >> what just happened to their text. > > Sorry, but you miss the fact that the highlighted region is _active_ > whereas the non-highlighted region is _inactive_. And _active_ region > changes the meaning of lots of commands, making them operate on the > region instead of their normal range. An _inactive_ region defined > with mark and point does not have such an effect. It merely sets mark > somewhere but assigns no special meaning to the region. Only commands > explicitly working on the region between mark and point are ever > affected. Even an inactive region has meaning (C-w proves it). What it doesn't have is some sort of visible clue as to where it is. That makes the mark a useful bookmark for experts who have read the manual (the TUTORIAL doesn't mention C-x C-x and friends) and useless and confusing to anyone else. The TUTORIAL mentions the mark one time, but it certainly doesn't talk about potential uses for it other than cutting regions of text. For the new user the mark doesn't exist. Unless, of course, they turn on transient-mark-mode, then, when the region is active the user can see where the mark and point happen to be. > So transient-mark-mode does something quite different from merely > highlighting the region. It changes its meaning. Yes, it changes the meaning in a way that even people that don't like transient-mark-mode seem to like. That's why commands behave differently with active regions. Or are you suggesting this feature should go away? A new user that highlights a region using transient-mark-mode and then does M-x query-replace to replace some text isn't going to be surprised that only text in the highlighted region is affected. Or if they are surprised they are likely to be excited by the fact that they can search and replace in a subset of a file easily. After all, you can always make the region inactive and run the command again. I know that when I stumbled across that functionality that I thought it was pretty cool. The whole point of marking a region is that you are going to do something to that region. The real tragedy is that, without transient-mark-mode, new users won't even know that they can run commands on a region of the text because they won't learn about making a region active unless they stumble accross the part of the manual that talks about The Mark and the Region. Even if you do stumble upon that section it doesn't tell you that making the region active changes the way many commands work. Like I mentioned before, I personally found out about this particular feature by accident. I assume that most of the people here found out about the feature by reading Emacs Lisp source code. That's fine if you are an Emacs Lisp developer. It's not so fine for the rest of us. If Emacs were some sort of text adventure (and I suppose that it is) then this sort of discovery would be worth quite a few points. Personally, I am glad that someone has decided that the default going forward is to give newcomers a clue by turning on transient-mark-mode and showing people (by default) the cool things that can be done with active regions. Yes, transient-mark-mode screws up the bookmarking features of inactive regions and marks (well, actually it just highlights the region, but why get technical). >> Marking regions in Emacs *should* be different than how it is done in >> other editors because the way Emacs marks regions is better :). >> However, it is not likely to *seem* better to the uninitiated if they >> have a hard time telling what parts of the text comprise the region. > > But the highlighting of tmm does more than show mark and point. Yes, it makes marking the region actually useful for a whole pile of commands at the expense of making the mark less useful as a bookmark. It's likely that I am missing some other magical use of the invisible mark, I just started using it today. Jason