unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Two escapes as a prefix
@ 2015-02-12 20:03 Tim Johnson
  2015-02-13  3:11 ` Robert Thorpe
  2015-02-13  3:31 ` John Mastro
  0 siblings, 2 replies; 5+ messages in thread
From: Tim Johnson @ 2015-02-12 20:03 UTC (permalink / raw)
  To: Emacs

Using emacs 24 on Mac OS X 10.7. All keybindings are designed to be
used in terminal mode.
See
https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
as my main reference.

I've created a number of prefix keys using C-c and an alpha
character. It has occurred to me that some of the most commonly used
sequences could have briefer alternate bindings using two escapes as
a prefix.

Example : coming from vim, Control-[ is second nature and pressing
the control key and '[' twice is almost as fast.

Control-[ Control-[ Control-h 
shows me only

ESC ESC ESC     keyboard-escape-quit
and 
ESC M-:         eval-expression

This opens up the possibility of
ESC M-(a...z)

To be clear, I'm proposing alternate bindings, so possible
overwrites by incidental major or minor modes wouldn't "cripple" me.

I'd welcome comments and observations. I expect I will be
edified serendipitously. 

thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two escapes as a prefix
  2015-02-12 20:03 Two escapes as a prefix Tim Johnson
@ 2015-02-13  3:11 ` Robert Thorpe
  2015-02-13  3:55   ` Tim Johnson
  2015-02-13  3:31 ` John Mastro
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Thorpe @ 2015-02-13  3:11 UTC (permalink / raw)
  To: Tim Johnson; +Cc: Help-gnu-emacs

Tim Johnson <tim@akwebsoft.com> writes:

> To be clear, I'm proposing alternate bindings, so possible
> overwrites by incidental major or minor modes wouldn't "cripple" me.
>
> I'd welcome comments and observations. I expect I will be
> edified serendipitously. 

That seems like a great idea.  For some reason though it seems to
interfer with the key's normal functioning.  If I bind '(kbd "ESC M-p")'
then the intended key works but, the normal 'p' key stops working.  I
could see why this could happen on terminals, though I don't understand
why it happens on Emacs in X.

BR,
Robert Thorpe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two escapes as a prefix
  2015-02-12 20:03 Two escapes as a prefix Tim Johnson
  2015-02-13  3:11 ` Robert Thorpe
@ 2015-02-13  3:31 ` John Mastro
  1 sibling, 0 replies; 5+ messages in thread
From: John Mastro @ 2015-02-13  3:31 UTC (permalink / raw)
  To: Emacs

Tim Johnson <tim@akwebsoft.com> wrote:
> I've created a number of prefix keys using C-c and an alpha
> character. It has occurred to me that some of the most commonly used
> sequences could have briefer alternate bindings using two escapes as
> a prefix.

[snip]

> I'd welcome comments and observations. I expect I will be
> edified serendipitously.

I've long used `backward-kill-sexp' on ESC M-DEL (so long that I had
myself convinced it was the default). I typically use it by pressing
ESC ESC DEL.

-- 
john



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two escapes as a prefix
  2015-02-13  3:11 ` Robert Thorpe
@ 2015-02-13  3:55   ` Tim Johnson
  2015-02-15 16:35     ` Tim Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Johnson @ 2015-02-13  3:55 UTC (permalink / raw)
  To: Help-gnu-emacs

* Robert Thorpe <rt@robertthorpeconsulting.com> [150212 18:19]:
> Tim Johnson <tim@akwebsoft.com> writes:
> 
> > To be clear, I'm proposing alternate bindings, so possible
> > overwrites by incidental major or minor modes wouldn't "cripple"
> > me.
> >
> > I'd welcome comments and observations. I expect I will be
> > edified serendipitously. 
> 
> That seems like a great idea.  For some reason though it seems to
> interfer with the key's normal functioning.  If I bind '(kbd "ESC
> M-p")' then the intended key works but, the normal 'p' key stops
> working.  I could see why this could happen on terminals, though I
> don't understand why it happens on Emacs in X.
  It sounds like we have a bit of an experiment and it just might be
  platform-and-guid-dependant. I'm going to play with some bindings
  on _Saturday_ (not Friday) and see what I find. And in the
  meantime, looking forward to more comments.

  thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two escapes as a prefix
  2015-02-13  3:55   ` Tim Johnson
@ 2015-02-15 16:35     ` Tim Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Johnson @ 2015-02-15 16:35 UTC (permalink / raw)
  To: Help-gnu-emacs

* Tim Johnson <tim@akwebsoft.com> [150212 19:07]:
> * Robert Thorpe <rt@robertthorpeconsulting.com> [150212 18:19]:
> > Tim Johnson <tim@akwebsoft.com> writes:
> > 
> > > To be clear, I'm proposing alternate bindings, so possible
> > > overwrites by incidental major or minor modes wouldn't "cripple"
> > > me.
> > >
> > > I'd welcome comments and observations. I expect I will be
> > > edified serendipitously. 
> > 
> > That seems like a great idea.  For some reason though it seems to
> > interfer with the key's normal functioning.  If I bind '(kbd "ESC
> > M-p")' then the intended key works but, the normal 'p' key stops
> > working.  I could see why this could happen on terminals, though I
> > don't understand why it happens on Emacs in X.
>   It sounds like we have a bit of an experiment and it just might be
>   platform-and-guid-dependant. I'm going to play with some bindings
>   on _Saturday_ (not Friday) and see what I find. And in the
>   meantime, looking forward to more comments.
> 
;; So far I have these alternate bindings 
(global-set-key (kbd "ESC M-a") 'beginning-of-buffer)
(global-set-key (kbd "ESC M-e") 'end-of-buffer)
(global-set-key (kbd "ESC M-RET") 'tj-toggle-bookmark)
(global-set-key (kbd "ESC C-M-n") 'bm-next)
(global-set-key (kbd "ESC C-M-p") 'bm-previous)
(global-set-key (kbd "ESC M-n") 'global-next-subroutine)
(global-set-key (kbd "ESC M-p") 'global-previous-subroutine)
;; and all seem to work
;; FYI: Some are wrappers of my own derivation
cheers
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-15 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 20:03 Two escapes as a prefix Tim Johnson
2015-02-13  3:11 ` Robert Thorpe
2015-02-13  3:55   ` Tim Johnson
2015-02-15 16:35     ` Tim Johnson
2015-02-13  3:31 ` John Mastro

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).