all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Meta key definition in a linux console
@ 2009-08-20  9:42 Olivier Sirven
  2009-08-20 11:15 ` Colin S. Miller
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Olivier Sirven @ 2009-08-20  9:42 UTC (permalink / raw
  To: help-gnu-emacs

Hello there,

I run a Mac laptop with emacs 23 and everything is just fine, my meta
key is defined to my command key and I'm happy with it. But when I
ssh to a distant linux machine and run an emacs 23 session in console
mode I don't have any other ways to access meta but by using ESC key
which is far from being an ergonomical solution. 
As this emacs version is compiled for linux, there is no such variable
as "mac-command-modifier" and I don't know how to tell emacs (or the
console) to use the command key as meta.

Any ideas would be just great!

Thanks

-- 
Olivier


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

* Re: Meta key definition in a linux console
  2009-08-20  9:42 Meta key definition in a linux console Olivier Sirven
@ 2009-08-20 11:15 ` Colin S. Miller
  2009-08-20 11:23   ` Olivier Sirven
  2009-08-20 11:50   ` Lowell Gilbert
  2009-08-20 11:58 ` Pascal J. Bourguignon
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 17+ messages in thread
From: Colin S. Miller @ 2009-08-20 11:15 UTC (permalink / raw
  To: help-gnu-emacs

Olivier Sirven wrote:
> Hello there,
> 
> I run a Mac laptop with emacs 23 and everything is just fine, my meta
> key is defined to my command key and I'm happy with it. But when I
> ssh to a distant linux machine and run an emacs 23 session in console
> mode I don't have any other ways to access meta but by using ESC key
> which is far from being an ergonomical solution. 
> As this emacs version is compiled for linux, there is no such variable
> as "mac-command-modifier" and I don't know how to tell emacs (or the
> console) to use the command key as meta.
> 
> Any ideas would be just great!
> 
> Thanks
> 

Olivier,
if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
then ssh will wrap an X-window connection from
the remote machine back to local machine, and set up any xauth information.
Then you can use the remote emacs as an X application.


HTH,
Colin S. Miller
-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.


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

* Re: Meta key definition in a linux console
  2009-08-20 11:15 ` Colin S. Miller
@ 2009-08-20 11:23   ` Olivier Sirven
  2009-08-20 14:14     ` Colin S. Miller
                       ` (2 more replies)
  2009-08-20 11:50   ` Lowell Gilbert
  1 sibling, 3 replies; 17+ messages in thread
From: Olivier Sirven @ 2009-08-20 11:23 UTC (permalink / raw
  To: help-gnu-emacs

"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:

> if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
> then ssh will wrap an X-window connection from
> the remote machine back to local machine, and set up any xauth information.
> Then you can use the remote emacs as an X application.
Thanks Colin I already know that and that's not want I want. I want to
use emacs in console mode only because I don't want to install X on my
distant servers.

Olivier


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

* Re: Meta key definition in a linux console
  2009-08-20 11:15 ` Colin S. Miller
  2009-08-20 11:23   ` Olivier Sirven
@ 2009-08-20 11:50   ` Lowell Gilbert
  2009-08-20 15:44     ` Xah Lee
  1 sibling, 1 reply; 17+ messages in thread
From: Lowell Gilbert @ 2009-08-20 11:50 UTC (permalink / raw
  To: help-gnu-emacs

"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:

> Olivier Sirven wrote:
>> Hello there,
>>
>> I run a Mac laptop with emacs 23 and everything is just fine, my meta
>> key is defined to my command key and I'm happy with it. But when I
>> ssh to a distant linux machine and run an emacs 23 session in console
>> mode I don't have any other ways to access meta but by using ESC key
>> which is far from being an ergonomical solution. As this emacs
>> version is compiled for linux, there is no such variable
>> as "mac-command-modifier" and I don't know how to tell emacs (or the
>> console) to use the command key as meta.
>>
>> Any ideas would be just great!
>>
>> Thanks
>>
>
> Olivier,
> if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
> then ssh will wrap an X-window connection from
> the remote machine back to local machine, and set up any xauth information.
> Then you can use the remote emacs as an X application.

If I recall correctly, the Mac doesn't come with X (Window System)
installed by default.  The Installer knows about it, though.


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

* Re: Meta key definition in a linux console
  2009-08-20  9:42 Meta key definition in a linux console Olivier Sirven
  2009-08-20 11:15 ` Colin S. Miller
@ 2009-08-20 11:58 ` Pascal J. Bourguignon
  2009-08-20 15:48 ` Xah Lee
  2009-08-20 16:40 ` Helmut Eller
  3 siblings, 0 replies; 17+ messages in thread
From: Pascal J. Bourguignon @ 2009-08-20 11:58 UTC (permalink / raw
  To: help-gnu-emacs

Olivier Sirven <the.slaa@gmail.com> writes:

> Hello there,
>
> I run a Mac laptop with emacs 23 and everything is just fine, my meta
> key is defined to my command key and I'm happy with it. But when I
> ssh to a distant linux machine and run an emacs 23 session in console
> mode I don't have any other ways to access meta but by using ESC key
> which is far from being an ergonomical solution. 
> As this emacs version is compiled for linux, there is no such variable
> as "mac-command-modifier" and I don't know how to tell emacs (or the
> console) to use the command key as meta.
>
> Any ideas would be just great!

Use a terminal (emulator) that is able to encode the Meta- key as the
8th bit.  Emacs should be able to recognize it more or less
automatically. (Ask again if you get accented characters instead of M-).

-- 
__Pascal Bourguignon__


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

* Re: Meta key definition in a linux console
  2009-08-20 11:23   ` Olivier Sirven
@ 2009-08-20 14:14     ` Colin S. Miller
  2009-08-20 15:04     ` Suvayu Ali
       [not found]     ` <mailman.4888.1250780699.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 17+ messages in thread
From: Colin S. Miller @ 2009-08-20 14:14 UTC (permalink / raw
  To: help-gnu-emacs

Olivier Sirven wrote:
> "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
> 
>> if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
>> then ssh will wrap an X-window connection from
>> the remote machine back to local machine, and set up any xauth information.
>> Then you can use the remote emacs as an X application.
> Thanks Colin I already know that and that's not want I want. I want to
> use emacs in console mode only because I don't want to install X on my
> distant servers.
> 
> Olivier

Olivier,

You are probably aware of this, but for the benefit of others,
to run an X-application on a remote machine via ssh,
it is not necessary to install X on the remote machine,
only the libraries for the X application, and xauth.

For emacs21 the .so list (from /proc/pid/maps) is

ld-2.7      libc-2.7     libdl-2.7
libgif      libICE       libjpeg
libm-2.7    libncurses   libnsl-2.7
libnss_compat-2.7 libnss_files-2.7 libnss_nis-2.7
libpng12    libSM        libtiff
libX11      libXau       libXaw3d
libxcb      libxcb-xlib  libXcursor
libXdmcp    libXext      libXfixes
libXmu      libXpm       libXrender
libXt       libz


Colin S. Miller

-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.


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

* Re: Meta key definition in a linux console
  2009-08-20 11:23   ` Olivier Sirven
  2009-08-20 14:14     ` Colin S. Miller
@ 2009-08-20 15:04     ` Suvayu Ali
       [not found]     ` <mailman.4888.1250780699.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 17+ messages in thread
From: Suvayu Ali @ 2009-08-20 15:04 UTC (permalink / raw
  To: help-gnu-emacs

Hi Olivier,

On Thursday 20 August 2009 04:23 AM, Olivier Sirven wrote:
> "Colin S. Miller"<no-spam-thank-you@csmiller.demon.co.uk>  writes:
>
>> if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
>> then ssh will wrap an X-window connection from
>> the remote machine back to local machine, and set up any xauth information.
>> Then you can use the remote emacs as an X application.
> Thanks Colin I already know that and that's not want I want. I want to
> use emacs in console mode only because I don't want to install X on my
> distant servers.
>

How about using tramp instead? I find it the most wonderful 
functionality in emacs for remote file editing. To use it just open a 
file in your local emacs with 
`/ssh:user@host:/path/to/file/on/remote/machine'. If you use ssh_keys 
then you don't even need to enter your password, feels almost like a 
local file.

GL :)

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: Meta key definition in a linux console
       [not found]     ` <mailman.4888.1250780699.2239.help-gnu-emacs@gnu.org>
@ 2009-08-20 15:17       ` Olivier Sirven
  0 siblings, 0 replies; 17+ messages in thread
From: Olivier Sirven @ 2009-08-20 15:17 UTC (permalink / raw
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> On Thursday 20 August 2009 04:23 AM, Olivier Sirven wrote:
>> "Colin S. Miller"<no-spam-thank-you@csmiller.demon.co.uk>  writes:
>>
>>> if you log in using "ssh -X" (capital X, lowercase disables X-forwarding),
>>> then ssh will wrap an X-window connection from
>>> the remote machine back to local machine, and set up any xauth information.
>>> Then you can use the remote emacs as an X application.
>> Thanks Colin I already know that and that's not want I want. I want to
>> use emacs in console mode only because I don't want to install X on my
>> distant servers.
>>
>
> How about using tramp instead? I find it the most wonderful
> functionality in emacs for remote file editing. To use it just open a
> file in your local emacs with
> /ssh:user@host:/path/to/file/on/remote/machine'. If you use ssh_keys
> then you don't even need to enter your password, feels almost like a
> local file.
Tramp is just fine for some purposes but not in this case. Let me
explain how I work on my distant file so you understand why I really
need my emacs to fully work in console mode.

I have a screen running on my distant server which is very useful to
me because it contains all the stuff I need to be able to work nicely:
remote connections to my other servers, database connection, some shell
commands running foreground and of course my emacs. And thanks to screen
I can use any available desktop computer or laptor to connect to my
server and get back my work desktop exactly how I left it.

That's why I really need my emacs console mode to be fully functional
even if I use a Mac to connect to it.

-- 
Olivier


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

* Re: Meta key definition in a linux console
  2009-08-20 11:50   ` Lowell Gilbert
@ 2009-08-20 15:44     ` Xah Lee
  2009-08-20 18:13       ` Lowell Gilbert
  0 siblings, 1 reply; 17+ messages in thread
From: Xah Lee @ 2009-08-20 15:44 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 20, 4:50 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
> If I recall correctly, the Mac doesn't come with X (Window System)
> installed by default.  The Installer knows about it, though.


LOL. spreading bad info.

Mac comes with Apple's own OSX integrated X11 bundled in the OS
Install CD since maybe 2004 or so.

It used to be it's not installed by default, not sure what's the
situation now.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Meta key definition in a linux console
  2009-08-20  9:42 Meta key definition in a linux console Olivier Sirven
  2009-08-20 11:15 ` Colin S. Miller
  2009-08-20 11:58 ` Pascal J. Bourguignon
@ 2009-08-20 15:48 ` Xah Lee
  2009-08-20 16:09   ` Olivier Sirven
  2009-08-20 16:40 ` Helmut Eller
  3 siblings, 1 reply; 17+ messages in thread
From: Xah Lee @ 2009-08-20 15:48 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 20, 2:42 am, Olivier Sirven <the.s...@gmail.com> wrote:
> Hello there,
>
> I run a Mac laptop with emacs 23 and everything is just fine, my meta
> key is defined to my command key and I'm happy with it. But when I
> ssh to a distant linux machine and run an emacs 23 session in console
> mode I don't have any other ways to access meta but by using ESC key
> which is far from being an ergonomical solution.
> As this emacs version is compiled for linux, there is no such variable
> as "mac-command-modifier" and I don't know how to tell emacs (or the
> console) to use the command key as meta.
>
> Any ideas would be just great!

i read the thread but seems your question is not very clear.

whether meta key works or what your keyboard hardware key invokes it
is a local issue, nothing to do with remote emacs...

If you are on Mac OS X, you are using Terminal right? In Terminal
preference, you can find a checkbox that lets you have Option key as
meta. That simply just works, if i understand you correctly.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Meta key definition in a linux console
  2009-08-20 15:48 ` Xah Lee
@ 2009-08-20 16:09   ` Olivier Sirven
  2009-08-20 16:58     ` Xah Lee
  0 siblings, 1 reply; 17+ messages in thread
From: Olivier Sirven @ 2009-08-20 16:09 UTC (permalink / raw
  To: help-gnu-emacs

Xah Lee <xahlee@gmail.com> writes:

> On Aug 20, 2:42 am, Olivier Sirven <the.s...@gmail.com> wrote:
> If you are on Mac OS X, you are using Terminal right? In Terminal
> preference, you can find a checkbox that lets you have Option key as
> meta. That simply just works, if i understand you correctly.
Yes doing so makes meta work using the Option key but it's not a valid
option to me: I have to use the Option key to be able to write some
characters like [,{,],},| so if I use Option as Meta it means I am not
able anymore to access these characters.

-- 
Olivier


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

* Re: Meta key definition in a linux console
  2009-08-20  9:42 Meta key definition in a linux console Olivier Sirven
                   ` (2 preceding siblings ...)
  2009-08-20 15:48 ` Xah Lee
@ 2009-08-20 16:40 ` Helmut Eller
  3 siblings, 0 replies; 17+ messages in thread
From: Helmut Eller @ 2009-08-20 16:40 UTC (permalink / raw
  To: help-gnu-emacs

* Olivier Sirven [2009-08-20 11:42+0200] writes:

> Hello there,
>
> I run a Mac laptop with emacs 23 and everything is just fine, my meta
> key is defined to my command key and I'm happy with it. But when I
> ssh to a distant linux machine and run an emacs 23 session in console
> mode I don't have any other ways to access meta but by using ESC key
> which is far from being an ergonomical solution. 
> As this emacs version is compiled for linux, there is no such variable
> as "mac-command-modifier" and I don't know how to tell emacs (or the
> console) to use the command key as meta.
>
> Any ideas would be just great!

Usually you have to set the proper TERM environment variable on the
remote machine and the remote machine needs the have an terminfo entry
for the value that you specify with TERM.  The terminfo database is
usually stored under /usr/share/terminfo (on the remote machine because
Emacs needs to read it.)

For Apple's terminal.app you can try: export TERM=Apple_Terminal 
on the Linux box.  You can also try nsterm or vt100.

I'm not familiar with Apple products and whether Meta can be used in
Emacs depends on the description in the terminfo database.  For a long
time even the entries for xterm weren't very good and the Apple stuff is
most likely pretty bad.  Terminal.app might also have some menu which
let's you say "send esc for meta".  But that's only a workaround for
broken terminfo descriptions.

Helmut


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

* Re: Meta key definition in a linux console
  2009-08-20 16:09   ` Olivier Sirven
@ 2009-08-20 16:58     ` Xah Lee
  0 siblings, 0 replies; 17+ messages in thread
From: Xah Lee @ 2009-08-20 16:58 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 20, 9:09 am, Olivier Sirven <the.s...@gmail.com> wrote:
> Xah Lee <xah...@gmail.com> writes:
> > On Aug 20, 2:42 am, Olivier Sirven <the.s...@gmail.com> wrote:
> > If you are on Mac OS X, you are using Terminal right? In Terminal
> > preference, you can find a checkbox that lets you have Option key as
> > meta. That simply just works, if i understand you correctly.
>
> Yes doing so makes meta work using the Option key but it's not a valid
> option to me: I have to use the Option key to be able to write some
> characters like [,{,],},| so if I use Option as Meta it means I am not
> able anymore to access these characters.

Ah ok. Your question is now clear. There are other terminal apps you
can try, which allows you to set Meta to Cmd.  Search the mac fan
sites you'll find them. Personally i've never tried them.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Meta key definition in a linux console
  2009-08-20 15:44     ` Xah Lee
@ 2009-08-20 18:13       ` Lowell Gilbert
  2009-08-20 18:27         ` Xah Lee
                           ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Lowell Gilbert @ 2009-08-20 18:13 UTC (permalink / raw
  To: help-gnu-emacs

Xah Lee <xahlee@gmail.com> writes:

> On Aug 20, 4:50 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
>> If I recall correctly, the Mac doesn't come with X (Window System)
>> installed by default.  The Installer knows about it, though.
>
>
> LOL. spreading bad info.
>
> Mac comes with Apple's own OSX integrated X11 bundled in the OS
> Install CD since maybe 2004 or so.
>
> It used to be it's not installed by default, not sure what's the
> situation now.

Bad info?  You said *exactly* what I did.  It doesn't come installed by
default, but the Mac system "Installer" has it as a standard package.


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

* Re: Meta key definition in a linux console
  2009-08-20 18:13       ` Lowell Gilbert
@ 2009-08-20 18:27         ` Xah Lee
  2009-08-21  3:10         ` Sumit Narayan
       [not found]         ` <mailman.5020.1250860040.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 17+ messages in thread
From: Xah Lee @ 2009-08-20 18:27 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 20, 11:13 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
> Xah Lee <xah...@gmail.com> writes:
> > On Aug 20, 4:50 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
> >> If I recall correctly, the Mac doesn't come with X (Window System)
> >> installed by default.  The Installer knows about it, though.
>
> > LOL. spreading bad info.
>
> > Mac comes with Apple's own OSX integrated X11 bundled in the OS
> > Install CD since maybe 2004 or so.
>
> > It used to be it's not installed by default, not sure what's the
> > situation now.
>
> Bad info?  You said *exactly* what I did.  It doesn't come installed by
> default, but the Mac system "Installer" has it as a standard package.

lol. Right, my mistake.

 Xah


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

* Re: Meta key definition in a linux console
  2009-08-20 18:13       ` Lowell Gilbert
  2009-08-20 18:27         ` Xah Lee
@ 2009-08-21  3:10         ` Sumit Narayan
       [not found]         ` <mailman.5020.1250860040.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 17+ messages in thread
From: Sumit Narayan @ 2009-08-21  3:10 UTC (permalink / raw
  To: Lowell Gilbert; +Cc: help-gnu-emacs

Are you using Terminal.app or X11 on Mac?

If you are using X11, did you try putting

Xterm*termName xterm

in ~/.Xdefaults?

Sumit.



On Thu, Aug 20, 2009 at 2:13 PM, Lowell Gilbert<lgusenet@be-well.ilk.org> wrote:
> Xah Lee <xahlee@gmail.com> writes:
>
>> On Aug 20, 4:50 am, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
>>> If I recall correctly, the Mac doesn't come with X (Window System)
>>> installed by default.  The Installer knows about it, though.
>>
>>
>> LOL. spreading bad info.
>>
>> Mac comes with Apple's own OSX integrated X11 bundled in the OS
>> Install CD since maybe 2004 or so.
>>
>> It used to be it's not installed by default, not sure what's the
>> situation now.
>
> Bad info?  You said *exactly* what I did.  It doesn't come installed by
> default, but the Mac system "Installer" has it as a standard package.
>




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

* Re: Meta key definition in a linux console
       [not found]         ` <mailman.5020.1250860040.2239.help-gnu-emacs@gnu.org>
@ 2009-08-21 13:15           ` Olivier Sirven
  0 siblings, 0 replies; 17+ messages in thread
From: Olivier Sirven @ 2009-08-21 13:15 UTC (permalink / raw
  To: help-gnu-emacs

I'm using iTerm.app or Terminal.app
I tried adding these lines too to /etc/inputrc without any success:
“\e[1~”: beginning-of-line
“\e[4~”: end-of-line
“\e[5~”: beginning-of-history
“\e[6~”: end-of-history
“\e[3~”: delete-char
“\e[2~”: quoted-insert
“\e[5C”: forward-word
“\e[5D”: backward-word
“\e\e[C”: forward-word
“\e\e[D”: backward-word

# Enable 8bit input
set meta-flag On
set input-meta On

# Turns off 8th bit stripping
set convert-meta Off

# Keep the 8th bit for display
set output-meta On

Sumit Narayan <sumnaray@gmail.com> writes:

> Are you using Terminal.app or X11 on Mac?
>
> If you are using X11, did you try putting
>
> Xterm*termName xterm
>
> in ~/.Xdefaults?

Olivier


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

end of thread, other threads:[~2009-08-21 13:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20  9:42 Meta key definition in a linux console Olivier Sirven
2009-08-20 11:15 ` Colin S. Miller
2009-08-20 11:23   ` Olivier Sirven
2009-08-20 14:14     ` Colin S. Miller
2009-08-20 15:04     ` Suvayu Ali
     [not found]     ` <mailman.4888.1250780699.2239.help-gnu-emacs@gnu.org>
2009-08-20 15:17       ` Olivier Sirven
2009-08-20 11:50   ` Lowell Gilbert
2009-08-20 15:44     ` Xah Lee
2009-08-20 18:13       ` Lowell Gilbert
2009-08-20 18:27         ` Xah Lee
2009-08-21  3:10         ` Sumit Narayan
     [not found]         ` <mailman.5020.1250860040.2239.help-gnu-emacs@gnu.org>
2009-08-21 13:15           ` Olivier Sirven
2009-08-20 11:58 ` Pascal J. Bourguignon
2009-08-20 15:48 ` Xah Lee
2009-08-20 16:09   ` Olivier Sirven
2009-08-20 16:58     ` Xah Lee
2009-08-20 16:40 ` Helmut Eller

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.