From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: `inhibit-mark-movement' Date: Wed, 8 Dec 2004 17:40:48 +0200 Message-ID: <200412081740.48280.pogonyshev@gmx.net> References: <200412080256.30114.pogonyshev@gmx.net> <871xe1trnq.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1102521366 12911 80.91.229.6 (8 Dec 2004 15:56:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2004 15:56:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 08 16:55:57 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cc3z0-0003Y0-00 for ; Wed, 08 Dec 2004 16:44:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc48r-0004EM-Ba for ged-emacs-devel@m.gmane.org; Wed, 08 Dec 2004 10:54:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cc48Z-0004ED-HW for emacs-devel@gnu.org; Wed, 08 Dec 2004 10:53:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cc48Y-0004Dt-Nz for emacs-devel@gnu.org; Wed, 08 Dec 2004 10:53:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc48Y-0004Dj-Kc for emacs-devel@gnu.org; Wed, 08 Dec 2004 10:53:54 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Cc3yR-0002S5-4g for emacs-devel@gnu.org; Wed, 08 Dec 2004 10:43:27 -0500 Original-Received: (qmail 15361 invoked by uid 65534); 8 Dec 2004 15:43:24 -0000 Original-Received: from unknown (EHLO localhost.localdomain) (195.50.12.120) by mail.gmx.net (mp007) with SMTP; 08 Dec 2004 16:43:24 +0100 X-Authenticated: #16844820 Original-To: Stefan Monnier , Juri Linkov User-Agent: KMail/1.4.3 In-Reply-To: <871xe1trnq.fsf-monnier+emacs@gnu.org> 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: main.gmane.org gmane.emacs.devel:30866 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30866 Stefan Monnier wrote: > > In other words, I'd like these two scenarios be possible > > simultaneously (in Transient Mark mode): > > > > 1. Select text from point to the end of function: C-SPC C-M-e > > > > 2. Glance at buffer beginning and go back: M-< C-u C-SPC > > I don't understand: just turning on transient-mark-mode, I get exactly > this behavior. No need to fiddle with inhibit-mark-movement. > What am I missing? Sorry, the first scenario is wrong. It should read this way: =091. Select text from point to somewhere else: C-SPC C-M-e / C-n... =09 where C-M-e and C-n (or something similar) can be mixed. What I'm trying to suggest is that commands should not modify active mark in Transient Mark mode _by side effect_. Commands like M-h are fine to modify mark, because they _activate_ it. If command is not meant to activate mark and the mark is active, the command should not touch it at all, because I activated mark exactly where I wanted it to be. If the mark is inactive, commands can alter it, because this is not intrusive for Transient Mark mode users and is useful for popping to previous mark positions. Juri Linkov wrote: > I already encountered the same problem some time ago. I fixed it as > below and really like this. It makes use of transient-mark-mode > more natural: the mark should not be changed when it is active. > If there is a need to set a new mark when the mark is already > active, it's possible to deactivates the current region with C-g, > and set a new mark. I didn't try your patch, but looks like it implements exactly what I'm trying to explain. Except that I proposed to make this behaviour optional. However, this behaviour seems much more natural to me, so maybe customization is not necessary if we don't mind surprising a few users. Juri Linkov wrote: > > I'd like these two scenarios be possible simultaneously (in > > Transient Mark mode): > > > > 1. Select text from point to the end of function: C-SPC C-M-e > > > > 2. Glance at buffer beginning and go back: M-< C-u C-SPC > > You can achieve the desired result with 3 more keys: > > 1. Select text from point to the end of function: C-SPC C-M-e > > 2. Glance at buffer beginning and go back: C-g M-< C-u C-SPC C-x C-x > =3D=3D=3D =3D= =3D=3D =3D=3D=3D Yes, you are right, but I meant "simultaneously" in that sense that I don't want to evaluate `(setq inhibit-mark-movement ...)' before realization of either of scenarios. Paul