help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find bindings for all modes


From: Robert Thorpe
Subject: Re: Find bindings for all modes
Date: Thu, 30 Oct 2014 02:04:52 +0000

Tim Johnson <tim@akwebsoft.com> writes:
>  1)I am new to terminal mode (need it for ssh connections to my main
>  machine from netbooks)
>  2)I have a limited knowledge of emacs.
>  3)I do not work in a team environment
>  4)I have limited movement in my hands and painful arthritis in my
>  thumbs, thus I seek quick sequences and short reaches.
>  Functionally, my hands are semi-crippled.
>  5)I use a happy hacker keyboard on my mac, where the control key is
>  in the same place as the caps lock on convention keyboards and I
>  set up all my other computers with caps lock and control swapped.

John Mastro <john.b.mastro@gmail.com> writes:
> My goal is to have a general-purpose prefix key on the right hand side
> of the keyboard, to complement C-c.

I think I understand both of your requirements better now.  I'll reply
to you both at once if you don't mind.

I'd begin by asking: why do you want terminal mode?  The normal purpose
of terminals these days is SSHing into remote computers.  Tim, why do
you need terminal mode if you don't work in a team environment?  It's
not really very useful otherwise.  If you have several computers of your
own then you can network them better using VNC, Samba, scp, Rsync and/or
other programs.  SSH and Telnet are the basics of networking used
connection are very slow or if the sysadmin prohibits anything else.
If you want the look of terminal mode you can approximate that with
themes.

There are advantages to redefining basic keys like C-j, C-l, C-o, etc as
prefix keys.  But, it's tricky, it's not like normal key bindings.  Lots
of Emacs modes assume those keys are unchanged.  For example,
list-buffer binds C-o to Buffer-menu-switch-other-window.  If you rebind
C-o globally and you want Buffer-menu-switch-other-window then you're
going to have to bind it to something else in buffer menus.  The same
goes for many other modes.  If you read through the archives of this
list you'll see people often get bitten by this.  If you've a good bit
of experience with elisp then that helps.  AFAIK Emmanuel Berg, who
often comments here, has done this.

Tim, have you tried god-mode or evil?  They may be more useful for
dealing with limited hand mobility.

Tim Johnson <tim@akwebsoft.com> writes:
> I didn't know that C-c x was available in that fashion. Thanks, a
> do you have URLs or Help for further docs on this?

Using C-c X type keys is easy.  You can do something like:
(global-set-key (kbd "C-c a") 'previous-buffer)
Or, you can use local-set-key.  See:
(info "(emacs) Rebinding")

John Mastro <john.b.mastro@gmail.com> writes:
> Keys that are unbound by default are an understandably attractive
> option for mode authors. On the other hand, no mode that I know of
> rebinds C-h, so I only deal with the issue once. Also, these are all
> either pinky keys, off the home row, or both.

Mode authors should be using C-c C-X, that's the prefix keymap they're
supposed to use.  I haven't seen any that use C-'#.,;= , but I don't use
many non-built-in modes.  It's probably easier to make external modes
behave than it is to deal with the many internal ones that assume things
about keymaps.  That said, John's redefining of C-h is probably ok, not
many modes tinker with that.  Tim's plan to change C-j, C-l, C-o, etc is
more difficult, almost every mode changes those.

BR,
Robert Thorpe







reply via email to

[Prev in Thread] Current Thread [Next in Thread]