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 12:23:37 -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> <87fxuyobxt.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 1205166292 7820 80.91.229.12 (10 Mar 2008 16:24:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 16:24:52 +0000 (UTC) Cc: juri@jurta.org, cyd@stupidchicken.com, emacs-devel@gnu.org, rms@gnu.org, Miles Bader To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 17:25:16 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 1JYkoN-0008VT-Us for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 17:25:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYknp-0006jj-Bh for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 12:24:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYkn4-0006FP-94 for emacs-devel@gnu.org; Mon, 10 Mar 2008 12:23:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYkmz-00069Q-8L for emacs-devel@gnu.org; Mon, 10 Mar 2008 12:23:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYkmz-00069C-17 for emacs-devel@gnu.org; Mon, 10 Mar 2008 12:23:49 -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 1JYkmq-0003SX-2U; Mon, 10 Mar 2008 12:23:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhQHAMr81EfO+JwVQWdsb2JhbACQdAEBAR4IEphDgQc X-IronPort-AV: E=Sophos;i="4.25,474,1199682000"; d="scan'208";a="15795614" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 10 Mar 2008 12:23:38 -0400 Original-Received: from pastel.home ([206.248.156.21]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id QTH08338; Mon, 10 Mar 2008 12:23:38 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 00330805A; Mon, 10 Mar 2008 12:23:37 -0400 (EDT) In-Reply-To: <87fxuyobxt.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Mon, 10 Mar 2008 16:06:54 +0100") 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:92050 Archived-At: >>>>> 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? >> >>> Anything that doesn't modify the buffer -- e.g. all movement commands. >> >> Supposedly these will be changed to use the new function, so they will >> explicitly deactivate the mark if the mark was activated with shift and >> the movement is then performed without the shift. > One problem is that basic movement commands are in C, not in Lisp. Doesn't look like a problem to me. > Another problem may be advise on functions - the "shift" handling > may then be performed too late. The way I see it, the (un)shift handling would be done in the `interactive' spec of those commands. Would that be too late? In which circumstance? > Personally, I like my proposal of just setting a "shift" property > on the relevant commands, and do it by running a shifted-key-hook > in the command loop. This suffers from the same problems as pre/post-command-hook. > That method has proven to work excellent with CUA mode! I know that pre/post-command-hook work just fine for lots of things, which is why they're provided. But it's better to avoid them for core functionality such as the functionality enabled by default. Stefan