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: Sun, 16 Mar 2008 10:40:46 -0400 Message-ID: <87hcf6ratt.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205678471 27317 80.91.229.12 (16 Mar 2008 14:41:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2008 14:41:11 +0000 (UTC) Cc: Dan Nicolaescu , Stefan Monnier , emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 16 15:41:39 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 1Jau3J-0005Nl-I2 for ged-emacs-devel@m.gmane.org; Sun, 16 Mar 2008 15:41:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jau2j-0001Aw-Vb for ged-emacs-devel@m.gmane.org; Sun, 16 Mar 2008 10:40:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jau2f-00018y-OG for emacs-devel@gnu.org; Sun, 16 Mar 2008 10:40:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jau2e-00016k-Bx for emacs-devel@gnu.org; Sun, 16 Mar 2008 10:40:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jau2e-00016h-8N for emacs-devel@gnu.org; Sun, 16 Mar 2008 10:40: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 1Jau2d-0003hw-Sv for emacs-devel@gnu.org; Sun, 16 Mar 2008 10:40:52 -0400 Original-Received: by furry (Postfix, from userid 1000) id BE59AC03C; Sun, 16 Mar 2008 10:40:46 -0400 (EDT) In-Reply-To: <8763vndi0r.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Sat\, 15 Mar 2008 18\:16\:52 +0100") 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:92744 Archived-At: storm@cua.dk (Kim F. Storm) writes: > Now, before you settle on a solution, maybe you should also consider > how to handle the delete-selection-mode in a sensible way without > using the current pre-command-hook + command property approach. > > Of course, since shift-select is promoted to a standard feature by > modifying the relevant commands, we can just take the same approach > with delete-selection-mode, i.e. modify the relevant commands to > simply honour delsel mode. There are two possible behaviors: 1. If transient mark mode is on, activating shift selection should resets and activates the mark, and the first unshifted command should then return transient mark mode to its original non-nil value. Thus shift selection "stacks" on top of transient mark mode. I am not certain if there is a clean way to do this. Maybe allow transient-mark-mode to take the form of a list? Any suggestions? 2. Shift selection commands activate the mark if it is not active, and extends the region if the mark is activate. Thus [S-right right right] would do the same thing as [S-right S-right S-right]. This would be rather easy to implement. Though this behavior sounds strange, it actually mirrors the way mouse selection currently works in transient-mark-mode.