From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: incrementor-decrementor commands and bindings (was: finger-pointer curser as default for mouse-face text) Date: Tue, 2 Nov 2004 17:27:13 -0800 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1099445294 5935 80.91.229.6 (3 Nov 2004 01:28:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2004 01:28:14 +0000 (UTC) Cc: Martin Blais , Miles Bader , rms@gnu.org, Stefan , Karl Eichwalder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 03 02:28:02 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CP9wQ-0002Ss-00 for ; Wed, 03 Nov 2004 02:28:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPA4U-0005Ns-Il for ged-emacs-devel@m.gmane.org; Tue, 02 Nov 2004 20:36:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPA4O-0005NO-Cd for emacs-devel@gnu.org; Tue, 02 Nov 2004 20:36:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPA4N-0005N1-TW for emacs-devel@gnu.org; Tue, 02 Nov 2004 20:36:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPA4N-0005Ms-PK for emacs-devel@gnu.org; Tue, 02 Nov 2004 20:36:15 -0500 Original-Received: from [141.146.126.230] (helo=agminet03.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CP9vr-0006Ln-Ob; Tue, 02 Nov 2004 20:27:28 -0500 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.191.12]) by agminet03.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id iA31RKv0005542; Tue, 2 Nov 2004 17:27:20 -0800 Original-Received: from rgmgw3.us.oracle.com (localhost [127.0.0.1]) by rgmgw3.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id iA31RKQZ019356; Tue, 2 Nov 2004 18:27:20 -0700 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-85-61.vpn.oracle.com [141.144.85.61]) by rgmgw3.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id iA31RH4i019296; Tue, 2 Nov 2004 18:27:17 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal 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: main.gmane.org gmane.emacs.devel:29352 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29352 This is starting to veer off-topic, but FWIW, this follows Stefan's last point. This was a main motivation behind my creating function `doremi': I wanted to have several different incrementing/decrementing commands bound to "repeatable" key sequences -- that is, chords (e.g. with modifiers) that can be held down to repeat an action. The number of such chord combinations is limited, however, and many combinations (e.g. the self-inserting chars, the arrows) are already taken, so I looked for another approach. I decided to use just the four arrow keys (and/or the mouse-wheel) for _all_ such commands - easy to use and remember. To do that, I have a non-chord binding for each incrementor-decrementor command to "start it up"; then the command itself reads the arrow keys and the mouse-wheel to do its job. For instance, I have these command bindings: C-x t c doremi-bg-rgb - change frame background color incrementally C-x t z doremi-font-size - zoom: change frame font size incrementally C-x t w doremi-frame-width - change frame width incrementally C-x t h doremi-frame-height - change frame height incrementally C-x t x doremi-frame-horizontally - move frame left/right incrementally C-x t y doremi-frame-vertically - move frame up/down incrementally C-x t b doremi-buffers - successively cycle among existing buffers C-x t m doremi-bookmarks - successively cycle among bookmarks C-x t t doremi-color-themes - successively cycle among color themes C-x t f doremi-font - successively cycle among fonts, choosing by name C-x t u doremi-frame-configs - undo: cycle among recorded frame configs C-x t . save-frame-config - add current frame config to the cycle for `C-x t u' [ Actually only one of the `C-x t' bindings `w' and `h' is needed. Likewise, only one of `x' and `y' really needs to be bound. Each of these commands lets you use all _four_ arrow keys and/or the mouse-wheel to move the frame in any direction or change any of its dimensions. So, for instance, a single binding lets you increment and decrement the frame width and frame height. It's like having 4 (+2 for the wheel) bindings in one. ] These particular incrementor-decrementor commands might not seem that interesting, but you might be able to imagine others that you would find useful. The point is that if each such command had to use a different pair of key bindings that let you continually hold the keys pressed, you would soon run out of chord combinations, and you would in any case have difficulty remembering them all. Eventually, BTW, I'd like to see users be able (as an option) to use such incrementor-decrementor commands to change appropriate settings on Customize pages (you see the change as its made; you can undo it if you like). This is not appropriate for all settings, by any means, but for some kinds of settings it could be useful. An example might be changing the default frame background color a la `doremi-bg-rgb'. The idea is to move more toward direct manipulation in the UI. - Drew -----Original Message-----From: Stefan BTW, C-+ is OK because it's currently unused, but C-- is already bound and I've been known to use it, so otherpeople might use it as well.