all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Tim Johnson <tim@akwebsoft.com>, John Mastro <john.b.mastro@gmail.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: Find bindings for all modes
Date: Thu, 30 Oct 2014 02:04:52 +0000	[thread overview]
Message-ID: <878ujy71ob.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <CAOj2CQQ=rH=TiVEXz4GdF-+XuvnXXU1_Ox07HjgYzkq7ah42Mg@mail.gmail.com> (message from John Mastro on Wed, 29 Oct 2014 16:05:14 -0700)

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







  parent reply	other threads:[~2014-10-30  2:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 17:58 Find bindings for all modes Tim Johnson
2014-10-28 21:53 ` John Mastro
2014-10-28 22:00   ` Tim Johnson
2014-10-28 22:18     ` John Mastro
2014-10-29  0:31       ` Tim Johnson
2014-10-29  3:09       ` Robert Thorpe
2014-10-29 18:19         ` Tim Johnson
2014-10-29 23:05         ` John Mastro
2014-10-30  1:46           ` Tim Johnson
2014-10-30  2:04           ` Robert Thorpe [this message]
2014-10-30 18:25             ` Tim Johnson
2014-11-01 21:00               ` Robert Thorpe
2014-11-04  0:04                 ` Tim Johnson

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

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

  git send-email \
    --in-reply-to=878ujy71ob.fsf@robertthorpeconsulting.com \
    --to=rt@robertthorpeconsulting.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=john.b.mastro@gmail.com \
    --cc=tim@akwebsoft.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.