all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Meta key for 'emacs -nw'
@ 2016-02-02  4:06 Bob Bernstein
  2016-02-02  8:57 ` Yuri Khan
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bob Bernstein @ 2016-02-02  4:06 UTC (permalink / raw)
  To: help-gnu-emacs

Emacs, unless specifically told not to do it -- with the 
'-nw' option, will ordinarily launch here (in an xterm) in X 
window fashion, and the Meta key is then 'Alt'.

Launched in the same xterm, with '-nw,' emacs uses Esc for 
its Meta key, which I find um disenchanting, for lack of a 
better term.

Do I need to place some information in my .emacs, perhaps 
related to the minibuffer, instructing emacs to stay with Alt 
for its Meta key? 

Or is this a matter of setting my xterm correctly?

(A thousand pardons if this is a  F A Q.)


-- 
Bob Bernstein


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

* Re: Meta key for 'emacs -nw'
  2016-02-02  4:06 Meta key for 'emacs -nw' Bob Bernstein
@ 2016-02-02  8:57 ` Yuri Khan
  2016-02-02  9:14 ` Magnus Therning
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yuri Khan @ 2016-02-02  8:57 UTC (permalink / raw)
  To: Bob Bernstein; +Cc: help-gnu-emacs@gnu.org

On Tue, Feb 2, 2016 at 10:06 AM, Bob Bernstein <rosebud@sdf.lonestar.org> wrote:

> Launched in […] xterm, with '-nw,' emacs uses Esc for
> its Meta key, which I find um disenchanting, for lack of a
> better term.
>
> […] is this a matter of setting my xterm correctly?

This. With a typical PC keyboard (which has Alt keys but no dedicated
hardware Meta keys), you’ll need to set the
XTerm.vt100.metaSendsEscape resource to true.



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

* Re: Meta key for 'emacs -nw'
  2016-02-02  4:06 Meta key for 'emacs -nw' Bob Bernstein
  2016-02-02  8:57 ` Yuri Khan
@ 2016-02-02  9:14 ` Magnus Therning
  2016-02-02  9:15 ` Magnus Therning
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Magnus Therning @ 2016-02-02  9:14 UTC (permalink / raw)
  To: Bob Bernstein; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]


Bob Bernstein writes:

> Emacs, unless specifically told not to do it -- with the 
> '-nw' option, will ordinarily launch here (in an xterm) in X 
> window fashion, and the Meta key is then 'Alt'.
>
> Launched in the same xterm, with '-nw,' emacs uses Esc for 
> its Meta key, which I find um disenchanting, for lack of a 
> better term.
>
> Do I need to place some information in my .emacs, perhaps 
> related to the minibuffer, instructing emacs to stay with Alt 
> for its Meta key? 
>
> Or is this a matter of setting my xterm correctly?
>
> (A thousand pardons if this is a  F A Q.)

For me it works beautifully out of the box in Gnome Terminal, but it
doesn't work in xterm. I'm guessing this means it's something that
should be fixed in the terminal rather than in emacs itself. No?

Maybe you can try this:
https://www.gnu.org/software/emacs/manual/html_node/efaq/Meta-key-does-not-work-in-xterm.html

/M

-- 
Magnus Therning              OpenPGP: 0x927912051716CE39
email: magnus@therning.org   jabber: magnus@therning.org
twitter: magthe               http://therning.org/magnus

You do not examine legislation in the light of the benefits it will
convey if properly administered, but in the light of the wrongs it
would do and the harms it would cause if improperly administered.
     -- Lyndon Johnson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: Meta key for 'emacs -nw'
  2016-02-02  4:06 Meta key for 'emacs -nw' Bob Bernstein
  2016-02-02  8:57 ` Yuri Khan
  2016-02-02  9:14 ` Magnus Therning
@ 2016-02-02  9:15 ` Magnus Therning
       [not found] ` <mailman.3406.1454403498.843.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Magnus Therning @ 2016-02-02  9:15 UTC (permalink / raw)
  To: Bob Bernstein; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]


Bob Bernstein writes:

> Emacs, unless specifically told not to do it -- with the 
> '-nw' option, will ordinarily launch here (in an xterm) in X 
> window fashion, and the Meta key is then 'Alt'.
>
> Launched in the same xterm, with '-nw,' emacs uses Esc for 
> its Meta key, which I find um disenchanting, for lack of a 
> better term.
>
> Do I need to place some information in my .emacs, perhaps 
> related to the minibuffer, instructing emacs to stay with Alt 
> for its Meta key? 
>
> Or is this a matter of setting my xterm correctly?
>
> (A thousand pardons if this is a  F A Q.)

Another thing to try: https://wiki.archlinux.org/index.php/Xterm#Fix_the_.27Alt.27_key

/M

-- 
Magnus Therning              OpenPGP: 0x927912051716CE39
email: magnus@therning.org   jabber: magnus@therning.org
twitter: magthe               http://therning.org/magnus

Finagle's Sixth Law:
Don't believe in miracles -- rely on them.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: Meta key for 'emacs -nw'
       [not found] ` <mailman.3406.1454403498.843.help-gnu-emacs@gnu.org>
@ 2016-02-02 14:43   ` HASM
  0 siblings, 0 replies; 7+ messages in thread
From: HASM @ 2016-02-02 14:43 UTC (permalink / raw)
  To: help-gnu-emacs


>> Launched in […] xterm, with '-nw,' emacs uses Esc for
>> its Meta key, which I find um disenchanting, for lack of a
>> better term.

> This. With a typical PC keyboard (which has Alt keys but no dedicated
> hardware Meta keys), you’ll need to set the
> XTerm.vt100.metaSendsEscape resource to true.

Alternatively you could set
  XTerm*eightBitInput: false
(though this may have other side effects.)

-- HASM


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

* Re: Meta key for 'emacs -nw'
       [not found] ` <mailman.3409.1454404529.843.help-gnu-emacs@gnu.org>
@ 2016-02-02 17:53   ` Bob Bernstein
  0 siblings, 0 replies; 7+ messages in thread
From: Bob Bernstein @ 2016-02-02 17:53 UTC (permalink / raw)
  To: help-gnu-emacs

Magnus Therning <magnus@therning.org> wrote:

> Another thing to try: https://wiki.archlinux.org/index.php/Xterm#Fix_the_.27Alt.27_key

The link above contains the method I eventually used. This, 
in my ~/.Xdefaults, works:

XTerm*metaSendsEscape: true

Thanks all who chimed in!

-- 
Bob Bernstein


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

* Re: Meta key for 'emacs -nw'
  2016-02-02  4:06 Meta key for 'emacs -nw' Bob Bernstein
                   ` (4 preceding siblings ...)
       [not found] ` <mailman.3409.1454404529.843.help-gnu-emacs@gnu.org>
@ 2016-02-02 23:15 ` Emanuel Berg
  5 siblings, 0 replies; 7+ messages in thread
From: Emanuel Berg @ 2016-02-02 23:15 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Bernstein <rosebud@sdf.lonestar.org> writes:

> Emacs, unless specifically told not to do it -- with
> the '-nw' option, will ordinarily launch here (in an
> xterm) in X window fashion, and the Meta key is
> then 'Alt'.

If you are on a Debian system or derivative, or some
other Linux distro with style, you can install the
emacs-nox package ("no X") to get -nw by default
(well, you don't have a choice!).

> Launched in the same xterm, with '-nw,' emacs uses
> Esc for its Meta key, which I find um disenchanting,
> for lack of a better term.

Esc for Meta works in the GUI, X version of Emacs as
well! This was once not as bad as today because the
Escape key had another position. Here is a picture of
a HP keyboard, as late as 1985:

    http://www.hpmuseum.net/images/HP-HILKeyboard-42.jpg

> Or is this a matter of setting my xterm correctly?

Put this is ~/.Xresources

    xterm*metaSendsEscape: true

then put this in ~/.xinitrc

    xrdb ~/.Xresources

> (A thousand pardons if this is a F A Q.)

This is a good FAQ question actually. Or "RQ" perhaps
(recurring questions).

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

end of thread, other threads:[~2016-02-02 23:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02  4:06 Meta key for 'emacs -nw' Bob Bernstein
2016-02-02  8:57 ` Yuri Khan
2016-02-02  9:14 ` Magnus Therning
2016-02-02  9:15 ` Magnus Therning
     [not found] ` <mailman.3406.1454403498.843.help-gnu-emacs@gnu.org>
2016-02-02 14:43   ` HASM
     [not found] ` <mailman.3409.1454404529.843.help-gnu-emacs@gnu.org>
2016-02-02 17:53   ` Bob Bernstein
2016-02-02 23:15 ` Emanuel Berg

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.