From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Shift selection using interactive spec Date: Tue, 18 Mar 2008 10:45:51 -0400 Message-ID: <87skyo5bvk.fsf@stupidchicken.com> References: <87k5k69p92.fsf@stupidchicken.com> <200803140408.m2E47hPU014494@sallyv1.ics.uci.edu> <87prtxpekk.fsf@kfs-lx.rd.rdm> <87abl11ilo.fsf@stupidchicken.com> <874pb9koyw.fsf@stupidchicken.com> <87od9gzqv9.fsf@stupidchicken.com> <87bq5gytbi.fsf@stupidchicken.com> <8763vndi0r.fsf@kfs-lx.rd.rdm> <87hcf6ratt.fsf@stupidchicken.com> <878x0if9ul.fsf@stupidchicken.com> <87od9e9gnx.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205851619 28765 80.91.229.12 (18 Mar 2008 14:46:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 14:46:59 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org, "Kim F. Storm" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 18 15:47:24 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 1Jbd5F-0000Vv-Sl for ged-emacs-devel@m.gmane.org; Tue, 18 Mar 2008 15:46:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jbd4f-0005QC-Sk for ged-emacs-devel@m.gmane.org; Tue, 18 Mar 2008 10:45:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jbd4b-0005Pa-SI for emacs-devel@gnu.org; Tue, 18 Mar 2008 10:45:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jbd4a-0005O2-9l for emacs-devel@gnu.org; Tue, 18 Mar 2008 10:45:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jbd4a-0005Nv-4D for emacs-devel@gnu.org; Tue, 18 Mar 2008 10:45:52 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182] helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jbd4Z-0008K1-Sv for emacs-devel@gnu.org; Tue, 18 Mar 2008 10:45:52 -0400 Original-Received: by furry (Postfix, from userid 1000) id 9B744C03C; Tue, 18 Mar 2008 10:45:51 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon\, 17 Mar 2008 09\:26\:16 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:92888 Archived-At: Stefan Monnier writes: >> If the user runs any other command, it is supposed to deactivate the >> mark/unhighlight the region. > > Maybe for most commands, but maybe not all. If all(most) non-shifted > movement commands turn it off explicitly (as I suggested above), and > given that all buffer modifications already turn it off, there isn't > much left and those left may actually be better off *not* turning the > selection off. > > I first want to try this, and only if it causes actual problems will > I want to try something else. The "only" form is too fleeting and tends > to disappear for the tiniest reasons. I prefer a region that > occasionally stays ON when we don't want it than one where you feel like > it might disappear from under you at any time. After playing around with an implementation of this, I feel that it is very problematic. The trouble with using handle-shift-selection to explicitly unhighlight the region is that every single motion command needs to call handle-shift-selection, by adding the ^ interactive spec. For every motion comman (or command that moves point in addition to something else), there will be a bug: the shift-selected region won't be highlighted. This therefore breaks backward compatibility with all external packages that define their own motion commands. I think it's better to stick to the implementation in my last patch, and change those commands for which we don't want to deactivate transient mark `only' mode. It's just a matter of making them set `identity' back to `only'.