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: Shift-movement selection Date: Mon, 10 Mar 2008 14:40:25 -0400 Message-ID: References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87d4q8sq9c.fsf@jurta.org> <8763w0n393.fsf@catnip.gol.com> <871w6ounk0.fsf@kfs-lx.rd.rdm> <87ablacdxt.fsf@catnip.gol.com> <87skyzzeng.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205174559 7603 80.91.229.12 (10 Mar 2008 18:42:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 18:42:39 +0000 (UTC) Cc: juri@jurta.org, cyd@stupidchicken.com, storm@cua.dk, emacs-devel@gnu.org, miles@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 19:43:05 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 1JYmwg-0004Gm-S9 for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 19:41:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYmw8-0004Uk-JD for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 14:41:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYmvN-0004EF-9U for emacs-devel@gnu.org; Mon, 10 Mar 2008 14:40:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYmvL-0004E3-7G for emacs-devel@gnu.org; Mon, 10 Mar 2008 14:40:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYmvL-0004E0-03 for emacs-devel@gnu.org; Mon, 10 Mar 2008 14:40:35 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYmvE-0006WT-6D; Mon, 10 Mar 2008 14:40:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhQHAK8d1UfO+JwVQWdsb2JhbACQdgEBAR4IEpk4gQc X-IronPort-AV: E=Sophos;i="4.25,475,1199682000"; d="scan'208";a="15802504" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 10 Mar 2008 14:40:27 -0400 Original-Received: from pastel.home ([206.248.156.21]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id QVY06627; Mon, 10 Mar 2008 14:40:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 845A9805A; Mon, 10 Mar 2008 14:40:25 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Mon, 10 Mar 2008 13:16:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:92084 Archived-At: >>>>> "Richard" == Richard Stallman writes: >> AFAICS, such an approach would make deselection much less likely to work >> consistently: the way it's _supposed_ to work is that any pretty much >> any command except for the special shifted versions should cause >> deactivation -- and in emacs that's pretty much _every command_. >> So to make it work "correctly", you need to modify all commands in >> emacs! [yikes!] > Most commands already deactivate the mark. So which ones would be left? > Do they matter? > Ordinary Emacs cursor motion commands such as C-f should not normally > deactivate the mark. That would be a painfully incompatible change. The part of the discussion you clipped said: >>> (defun activate-on-shift-selecting-movement () >>> (if (this-command-keys-are-shifted-p) >>> (progn >>> (setq shift-selecting-movement t) >>> (unless mark-active (set-mark))) >>> (when shift-selecting-movement >>> (setq shift-selecting-movement nil) >>> (when mark-active (deactivate-mark))))) >>> >>> and then call it from wherever it's considered useful >>> (e.g. forward-char, next-line, ...). so cursor motion commands such as C-f would still not normally deactivate the mark, except when the mark was activated by a shifted key. This is the desired behavior. CUA implements it, and pc-select was "recently" changed to do the same. Stefan