From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: position on changing defaults? Date: Thu, 06 Mar 2008 22:38:56 -0500 Message-ID: References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87d4q8sq9c.fsf@jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1204861556 27641 80.91.229.12 (7 Mar 2008 03:45:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 03:45:56 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 04:46:23 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 1JXTXJ-0005SQ-2f for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 04:46:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXTWl-00022f-5a for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 22:45:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXTQC-0003Kf-2Z for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:39:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXTQA-0003J2-DT for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:38:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXTQA-0003Iw-7b for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:38:58 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXTQ9-0000tD-SM for emacs-devel@gnu.org; Thu, 06 Mar 2008 22:38:58 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JXTQ8-0001c8-U7; Thu, 06 Mar 2008 22:38:56 -0500 In-reply-to: <87d4q8sq9c.fsf@jurta.org> (message from Juri Linkov on Thu, 06 Mar 2008 01:30:23 +0200) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:91597 Archived-At: Unfortunately, I see no way of implementing this in simple.el without using pre-command-hook and post-command-hook. It seems this can be implemented only in C in the function that reads characters. Maybe I can see a way to do it using nicer underlying mechanisms. I am not entirely sure what the feature does; what does it need these hooks for? Miles wrote: How about adding a new type of binding, a "modifier binding", which could serve to implement CUA movement, and replace the current automatic S-foo => foo remapping. I do not understand -- what would this "modifier binding" mean, and how would you use it for this? Basically, these would be bindings that represent event-modifiers only. If normal key lookup fails, the keymapping mechanism would then look up and invoke the modifier binding corresponding to the modifiers on the key, and invoke it instead; the invoked function could then, if it wished (e.g. for CUA), set some variables or frob some state and re-invoke the event with the modifiers removed. I am still not sure I understand. If it means a kind of default binding for all Shift keys that have no individual binding, why is that better than binding the four shift-arrow keys in the global map? In general, I agree with the idea of exposing the translation of unbound event-modified keys to Lisp functions that can process untranslated keys. Maybe it would be possible to implement the following interface to define such bindings? (define-key global-map [(shift untranslated)] (lambda () (interactive) (when (and transient-mark-mode (not mark-active)) (push-mark-command nil nil)))) What does (shift untranslated) mean, and what would it do? And how does it relate to this feature?