unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: Martin Blais <martin.blais@gmail.com>,
	Miles Bader <miles@gnu.org>,
	rms@gnu.org, Stefan <monnier@iro.umontreal.ca>,
	Karl Eichwalder <ke@gnu.franken.de>
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	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBGECFCJAA.drew.adams@oracle.com> (raw)
In-Reply-To: <m1k6t3g68r.fsf-monnier+emacs@gnu.org>

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.

  reply	other threads:[~2004-11-03  1:27 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DNEMKBNJBGPAOPIJOOICAEKKCAAA.drew.adams@oracle.com>
2004-10-19  9:04 ` finger-pointer curser as default for mouse-face text Kim F. Storm
2004-10-19 15:31   ` Lennart Borgman
2004-10-19 16:12   ` Drew Adams
2004-10-21 13:56   ` Richard Stallman
2004-10-21 14:47     ` Kim F. Storm
2004-10-21 16:03       ` Lennart Borgman
2004-10-23  4:48       ` Richard Stallman
2004-10-24 12:42         ` Kim F. Storm
2004-10-24 12:59           ` Lennart Borgman
2004-10-24 19:40             ` Kim F. Storm
2004-10-24 20:06               ` Lennart Borgman
2004-10-25 13:13             ` Richard Stallman
2004-10-24 13:10           ` David Kastrup
2004-10-24 19:59             ` Kim F. Storm
2004-10-26  9:04               ` Richard Stallman
2004-10-26 17:05                 ` Lennart Borgman
2004-10-24 22:31           ` Stefan
2004-10-25  7:22             ` David Kastrup
2004-10-25 11:47               ` Stefan
2004-10-25 12:51                 ` David Kastrup
2004-10-25 13:50                   ` Stefan Monnier
2004-10-25 14:52                     ` Ralf Angeli
2004-10-25 15:08                       ` Stefan Monnier
2004-10-25 15:18                         ` David Kastrup
2004-10-25 15:35                           ` Stefan Monnier
2004-10-26  9:00                             ` Kim F. Storm
2004-10-26  9:25                               ` David Kastrup
2004-10-26 12:23                                 ` Kim F. Storm
2004-10-26 18:55                                   ` Drew Adams
2004-10-26 21:06                                     ` David Kastrup
2004-10-26 21:54                                     ` Kim F. Storm
2004-10-27  2:15                                       ` Luc Teirlinck
2004-10-27 12:52                                         ` Kim F. Storm
2004-10-27 13:02                                           ` Luc Teirlinck
2004-10-27 13:16                                           ` David Kastrup
2004-10-27 14:51                                             ` feature freeze (was: finger-pointer curser as default for mouse-face text) Reiner Steib
2004-10-27 15:15                                               ` Kim F. Storm
2004-10-27 15:15                                               ` feature freeze David Kastrup
2004-10-27 17:29                                           ` finger-pointer curser as default for mouse-face text Drew Adams
2004-10-28 14:05                                             ` Kim F. Storm
2004-10-27 17:35                                       ` Richard Stallman
2004-11-01 14:40                                         ` Karl Eichwalder
2004-11-01 15:44                                           ` Stefan
2004-11-02 14:08                                           ` Richard Stallman
2004-11-02 18:08                                             ` Karl Eichwalder
2004-11-02 21:51                                               ` Miles Bader
2004-11-02 23:41                                                 ` Drew Adams
2004-11-02 23:53                                                   ` Stefan
2004-11-03  1:27                                                     ` Drew Adams [this message]
2004-11-03  7:51                                                       ` incrementor-decrementor commands and bindings (was: finger-pointercurser as default for mouse-face text) Stephan Stahl
2004-11-03 15:26                                                         ` Drew Adams
2004-11-04  9:51                                                           ` Richard Stallman
2004-11-03  1:34                                                     ` finger-pointer curser as default for mouse-face text Miles Bader
2004-11-03  9:31                                                       ` Kim F. Storm
2004-11-03  9:26                                                     ` Kim F. Storm
2004-11-03 10:20                                                       ` David Kastrup
2004-11-03 17:04                                                 ` Richard Stallman
2004-11-03  9:11                                               ` Kim F. Storm
2004-11-03 17:03                                               ` Richard Stallman
2004-10-27 17:34                                   ` Richard Stallman
2004-10-27 10:49                               ` Richard Stallman
2004-10-27 12:24                                 ` Kim F. Storm
2004-10-27 13:03                                   ` Stefan Monnier
2004-10-27 13:18                                   ` David Kastrup
2004-10-28  2:27                                 ` Miles Bader
2004-10-27  7:22                             ` Kai Grossjohann
2004-10-27  7:35                               ` David Kastrup
2004-10-27 12:32                                 ` Kim F. Storm
2004-10-28  6:24                                 ` Richard Stallman
2004-10-27 10:47                             ` Richard Stallman
2004-10-26  9:05               ` Richard Stallman
2004-10-25  8:31             ` Kim F. Storm
2004-10-25 10:01               ` David Kastrup
2004-10-25 12:32                 ` Kim F. Storm
2004-10-26  9:05               ` Richard Stallman
2004-10-25 13:13           ` Richard Stallman
2004-10-21 14:09   ` David Kastrup
2004-10-21 14:42     ` Kim F. Storm
2004-10-21 15:21       ` David Kastrup
2004-10-21 19:55         ` Kim F. Storm
2004-10-21 20:09           ` Drew Adams
2004-10-21 21:45             ` Stefan Monnier
2004-10-21 22:09               ` David Kastrup
2004-10-22  9:10                 ` Kim F. Storm
2004-10-22 12:45                   ` David Kastrup
2004-10-22 15:03                     ` Kim F. Storm
2004-10-22 15:56                       ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FDELKNEBLPKKDCEBEJCBGECFCJAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=ke@gnu.franken.de \
    --cc=martin.blais@gmail.com \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).