all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to Map Alt key globally
@ 2018-05-05 18:38 Tim Johnson
  2018-05-05 18:50 ` Tim Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Johnson @ 2018-05-05 18:38 UTC (permalink / raw)
  To: Emacs

The following error message
global-set-key: Key sequence M-a starts with non-prefix key ESC

Is generated when I attempted to execute
(global-set-key (kbd "M-a") 'move-beginning-of-line)

Alt-a is undefined prior to execution

What is proper way to map this keystroke?

thanks
-- 
Tim Johnson
http://www.akwebsoft.com, http://www.tj49.com



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

* Re: How to Map Alt key globally
  2018-05-05 18:38 How to Map Alt key globally Tim Johnson
@ 2018-05-05 18:50 ` Tim Johnson
  2018-05-05 19:05   ` Yuri Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Johnson @ 2018-05-05 18:50 UTC (permalink / raw)
  To: help-gnu-emacs

* Tim Johnson <tim@akwebsoft.com> [180505 10:47]:
> The following error message
> global-set-key: Key sequence M-a starts with non-prefix key ESC
> 
> Is generated when I attempted to execute
> (global-set-key (kbd "M-a") 'move-beginning-of-line)
> 
> Alt-a is undefined prior to execution
> 
> What is proper way to map this keystroke?
  I forgot to mention:
  With 
  emacs -q
  the mapping works. 
  :) What have I done? And how do I trace It?

-- 
Tim Johnson
http://www.akwebsoft.com, http://www.tj49.com



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

* Re: How to Map Alt key globally
  2018-05-05 18:50 ` Tim Johnson
@ 2018-05-05 19:05   ` Yuri Khan
  2018-05-05 19:30     ` Tim Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Yuri Khan @ 2018-05-05 19:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, May 6, 2018 at 1:50 AM Tim Johnson <tim@akwebsoft.com> wrote:

> > The following error message
> > global-set-key: Key sequence M-a starts with non-prefix key ESC
> >
> > Is generated when I attempted to execute
> > (global-set-key (kbd "M-a") 'move-beginning-of-line)

>    :) What have I done? And how do I trace It?

It looks like you have bound something to ESC. What does C-h k ESC say?

(Also, are you using a graphical Emacs version, or in terminal?)



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

* Re: How to Map Alt key globally
  2018-05-05 19:05   ` Yuri Khan
@ 2018-05-05 19:30     ` Tim Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Johnson @ 2018-05-05 19:30 UTC (permalink / raw)
  To: help-gnu-emacs

* Yuri Khan <yurivkhan@gmail.com> [180505 11:12]:
> On Sun, May 6, 2018 at 1:50 AM Tim Johnson <tim@akwebsoft.com> wrote:
> 
> > > The following error message
> > > global-set-key: Key sequence M-a starts with non-prefix key ESC
> > >
> > > Is generated when I attempted to execute
> > > (global-set-key (kbd "M-a") 'move-beginning-of-line)
> 
> >    :) What have I done? And how do I trace It?
> 
> It looks like you have bound something to ESC. What does C-h k ESC say?
> 
> (Also, are you using a graphical Emacs version, or in terminal?)
  I'm using graphical Emacs 25.3.2 on Ubuntu 16.04
  C-h k ESC waited for another key input. Upon entering the second
  ESC, I get ESC-ESC is undefined. (should have allowed a third ESC
  for keyboard-escape quit).
  
  This suggested to me that prior "twiddling" (rather than a
  previously loaded elisp file) had caused this problem.

  So I reloaded the exisiting emacs configuration, and then compiled
  and reloaded the source and the problem is solved.

  I believe that I must have executed something like
  (global-set-key (kbd "C-[") 'foo) 
  ;; "C-[" translates to ESC on my system

  which I would guarantee would clobber sequences starting with ESC for sure.
  Sorry, :) Never mind!

-- 
Tim Johnson
http://www.akwebsoft.com, http://www.tj49.com



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

end of thread, other threads:[~2018-05-05 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-05 18:38 How to Map Alt key globally Tim Johnson
2018-05-05 18:50 ` Tim Johnson
2018-05-05 19:05   ` Yuri Khan
2018-05-05 19:30     ` Tim Johnson

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.