From: Jeff
Subject: Newbie: Emacs Advice
Date: 
Message-ID: <1123490321.932873.25900@g44g2000cwa.googlegroups.com>
In order for my question to make any sense, some background is needed.
I've been learning Lisp for a little over a month now.  Before Lisp, I
used Vim as my editor of choice.  However, Emacs and Slime seem to be a
much better option for Lisp programming.  I'm slowly learning the
various keystrokes to be productive.  The problem is that I find many
of the keystrokes to be awkward.  Seems that I'm constantly pressing 2,
3 and occasionally 4 keys at once.  Some of these key combinations
(especially the 4 key combinations) seem straining and almost
impossible to generate for a touch typist that prefers to keep fingers
at the home row.

These key combinations remind me of guitar chords.  Guitar books
commonly list preferred fingering for the various chords.  Is there
something similar for Emacs chords, or more convenient keybindings for
Lisp programming?

From: ·············@antenova.com
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <1123500721.897819.94760@g43g2000cwa.googlegroups.com>
Jeff wrote:
> In order for my question to make any sense, some background is needed.
> I've been learning Lisp for a little over a month now.  Before Lisp, I
> used Vim as my editor of choice.  However, Emacs and Slime seem to be a
> much better option for Lisp programming.  I'm slowly learning the
> various keystrokes to be productive.  The problem is that I find many
> of the keystrokes to be awkward.  Seems that I'm constantly pressing 2,
> 3 and occasionally 4 keys at once.  Some of these key combinations
> (especially the 4 key combinations) seem straining and almost
> impossible to generate for a touch typist that prefers to keep fingers
> at the home row.
>
> These key combinations remind me of guitar chords.  Guitar books
> commonly list preferred fingering for the various chords.  Is there
> something similar for Emacs chords, or more convenient keybindings for
> Lisp programming?

On PCs Meta is normally Alt.  Also, Esc is normally a sticky meta, so
to do something awkward like M-C-e for end-of-defun you can tap Esc
then Ctrl-e.

Also, both C-_ and C-x u are undo, often C-x u is easier to hit.

There are other things you can do, gnu.emacs.help is a better place to
ask the question.
From: Jeff
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <1123504869.490939.255320@g49g2000cwa.googlegroups.com>
·············@antenova.com wrote:

> On PCs Meta is normally Alt.  Also, Esc is normally a sticky meta, so
> to do something awkward like M-C-e for end-of-defun you can tap Esc
> then Ctrl-e.
>
> Also, both C-_ and C-x u are undo, often C-x u is easier to hit.
>

The sticky meta might do the trick.  Given my previous Vim experience
I'm already
accustomed to hitting the Esc key.
From: ·············@antenova.com
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <1123519860.762889.62800@g14g2000cwa.googlegroups.com>
Jeff wrote:
> ·············@antenova.com wrote:
>
> > On PCs Meta is normally Alt.  Also, Esc is normally a sticky meta, so
> > to do something awkward like M-C-e for end-of-defun you can tap Esc
> > then Ctrl-e.
> >
> > Also, both C-_ and C-x u are undo, often C-x u is easier to hit.
> >
>
> The sticky meta might do the trick.  Given my previous Vim experience
> I'm already
> accustomed to hitting the Esc key.

Also useful is Viper if you've used Vi.  It can be setup so all the vi
commands and emacs commands work and you can pick the quickest.

What 3/4 keystroke chords do you use?  I can't think of any 4 key ones
I use, and only four 3-key ones: M-C-e, M-C-a M-< M->.
From: Ulrich Hobelmann
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <3lom6vF13mgrtU1@individual.net>
Jeff wrote:
> In order for my question to make any sense, some background is needed.
> I've been learning Lisp for a little over a month now.  Before Lisp, I
> used Vim as my editor of choice.  However, Emacs and Slime seem to be a
> much better option for Lisp programming.  I'm slowly learning the
> various keystrokes to be productive.  The problem is that I find many
> of the keystrokes to be awkward.

M-x viper-mode ;)

> These key combinations remind me of guitar chords.  Guitar books
> commonly list preferred fingering for the various chords.  Is there
> something similar for Emacs chords, or more convenient keybindings for
> Lisp programming?

You could set your function keys with often-used functions.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
	Dogbert
From: Marco Baringer
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <m2fytk8oig.fsf@soma.local>
"Jeff" <··········@bigfoot.com> writes:

> In order for my question to make any sense, some background is needed.
> I've been learning Lisp for a little over a month now.  Before Lisp, I
> used Vim as my editor of choice.  However, Emacs and Slime seem to be a
> much better option for Lisp programming.  I'm slowly learning the
> various keystrokes to be productive.  The problem is that I find many
> of the keystrokes to be awkward.  Seems that I'm constantly pressing 2,
> 3 and occasionally 4 keys at once.  Some of these key combinations
> (especially the 4 key combinations) seem straining and almost
> impossible to generate for a touch typist that prefers to keep fingers
> at the home row.

4 keys at once? ouch! what keys are these? maybe you sholud rebind
them?

in my current setup i have meta immediatly under my lefn thumb, which
makes it easy to hit. i have control immediatly under my left pinky
(where the caps lock key is). i don't think i've any commands which
require more than control + meta + (one key), and 90% of the commands
i use are combinations of control + (one key) or meta + (one key). 

using emacs should not require tentacles or 15 fingers, which keys,
exactly, are bothering you?

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Pascal Bourguignon
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <873bpks6on.fsf@thalassa.informatimago.com>
"Marco Baringer" <··@bese.it> writes:
> 4 keys at once? ouch! what keys are these? maybe you sholud rebind
> them?

(global-set-key (kbd "A-C-M-S-s-H-x")
    (lambda()(interactive)(insert"Alt-Ctrl-Meta-Shift-Super-Hyper-x")))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush
From: Marco Baringer
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <m2br486rrx.fsf@soma.local>
Pascal Bourguignon <····@mouse-potato.com> writes:

> "Marco Baringer" <··@bese.it> writes:
>> 4 keys at once? ouch! what keys are these? maybe you sholud rebind
>> them?
>
> (global-set-key (kbd "A-C-M-S-s-H-x")
>     (lambda()(interactive)(insert"Alt-Ctrl-Meta-Shift-Super-Hyper-x")))

you definetly need whatever keyboard Erwin has :)

(from ······@irc.freenode.net, date unknown)

<SynrG> i can hide/show subtrees using the menu, but the keys to do this are hopelessly complicated
<SynrG> i mean come on ... C-c @ C-s and C-c @ C-d ... who thinks up these? :)
<SynrG> do "real emacs users" just tolerate this, or do they typically come up with their own easier
    keymappings when they find they need frequent access to awkwardly keyed commands?
<cmg> easier keymappings for very frequence stuff
<Erwin> I have remapped C-c to left-eye-blink

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Pascal Bourguignon
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <873bpkq86m.fsf@thalassa.informatimago.com>
"Marco Baringer" <··@bese.it> writes:
> Pascal Bourguignon <····@mouse-potato.com> writes:
>
>> "Marco Baringer" <··@bese.it> writes:
>>> 4 keys at once? ouch! what keys are these? maybe you sholud rebind
>>> them?
>>
>> (global-set-key (kbd "A-C-M-S-s-H-x")
>>     (lambda()(interactive)(insert"Alt-Ctrl-Meta-Shift-Super-Hyper-x")))
>
> you definetly need whatever keyboard Erwin has :)

Actually, the only key I'm missing on my MS-Windows compatible
keyboard is Hyper, and I could still map it somewhere: these 105 or
107-key keyboards have a handy row of four (4) modifiers on the right
of the space bar:  Alt Meta Super Control (well, they're labelled
AltGr, Windows, Menu and Ctrl, but any hacker with a Das Keyboard
(http;//www.daskeyboard.com) or a unmarked Happy Hacker Keyboard
doesn't mind. 

Since arround here I can only find easily non-US keyboards, I get a
small left shift with one more key that I should probably map to Hyper...


Actually, I could use some ideas of commands to map to Super and Alt.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay
From: David Golden
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <uzQJe.3616$R5.618@news.indigo.ie>
Jeff wrote:

> Some of these key combinations
> (especially the 4 key combinations) seem straining and almost
> impossible to generate for a touch typist that prefers to keep fingers
> at the home row.
>

PC keyboards have a horrible misfeature - Caps Lock is where Control
should be.  (You might not notice it, but Esc is also a bit far away
for many long-time vi users' liking). Emacs keybindings arose when most
machines had control in its rightful place rather than the cursed PC
location.

If you're on linux (or other platform with xorg xserver) place the
following in your /etc/X11/xorg.conf * in the InputDevice section for
your keyboard:
 
Option      "XkbOptions" "ctrl:nocaps"

This makes Caps Lock into an extra Control.

(or ctrl:swapcaps instead means left Control and Caps Lock swap places
if for some reason you want to keep Caps Lock around)

You'd still have to chord with this simple change, but it's
much, much less annoying. Other posters have pointed out non-chording
options for emacs (use Esc, Viper mode), but I find moving Control to
where it's supposed to be is enough, myself.

* On older linux, the file may be /etc/X11/XF86Config or XF86Config-4,
but since the XFree86 license change, most distros use X.org
From: Matthias Buelow
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <3lq70nF13h72nU3@news.dfncis.de>
David Golden <············@oceanfree.net> wrote:

>Option      "XkbOptions" "ctrl:nocaps"
>This makes Caps Lock into an extra Control.

On shared machines where you're not root (and hence cannot edit the
X config), or on non-XFree/Xorg systems, you can use xmodmap (by,
say, calling "xmodmap $HOME/.xmodmap" in .xsession) with the following
in the config file:

remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L
keysym Menu = Multi_key

Btw., if someone knows a method of doing that quickly without
exchanging system DLLs on Windows, I'd be interested of hearing
about it.

mkb.
From: Bjorn Solberg
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <m3acjsaspv.fsf@pacbell.net>
Matthias Buelow writes:

> David Golden <············@oceanfree.net> wrote:
>> Option      "XkbOptions" "ctrl:nocaps"
>> This makes Caps Lock into an extra Control.

> On shared machines where you're not root (and hence cannot edit the
> X config), or on non-XFree/Xorg systems, you can use xmodmap (by,
> say, calling "xmodmap $HOME/.xmodmap" in .xsession) with the following
> in the config file:

> remove Lock = Caps_Lock
> keysym Caps_Lock = Control_L
> add Control = Control_L
> keysym Menu = Multi_key

> Btw., if someone knows a method of doing that quickly without
> exchanging system DLLs on Windows, I'd be interested of hearing
> about it.

I found this a while ago, at http://c2.com/cgi/wiki?RemapCapsLock:

Make a file named (for example) CapsLockIsCtrl.reg with these three
lines:

REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

Double click it from Windows explorer, reboot.  That nasty CapsLock is
gone!

This has saved me lots of agony when having to work in Windows.

Bjorn.
From: Rob Warnock
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <LtqdnaZWAsjSV2PfRVn-1Q@speakeasy.net>
Matthias Buelow  <···@incubus.de> wrote:
+---------------
| "xmodmap $HOME/.xmodmap" in .xsession) with the following
| in the config file:
|   remove Lock = Caps_Lock
|   keysym Caps_Lock = Control_L
|   add Control = Control_L
|   keysym Menu = Multi_key
+---------------

I've found the following simpler version works just as well for me
[in ~/.xsession or ~/.xinitrc]:

    xmodmap - <<EOF
    clear Lock
    add Control = Caps_Lock
    EOF


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: GP lisper
Subject: Re: Newbie: Emacs Advice
Date: 
Message-ID: <1123626247.dadb51f21d7d75325d0959862a140e22@teranews>
On Mon, 08 Aug 2005 22:57:46 +0100, <············@oceanfree.net> wrote:
>
>
> Jeff wrote:
>
>> Some of these key combinations
>> (especially the 4 key combinations) seem straining and almost
>> impossible to generate for a touch typist that prefers to keep fingers
>> at the home row.
>>
>
> PC keyboards have a horrible misfeature - Caps Lock is where Control
> should be.  (You might not notice it, but Esc is also a bit far away
> for many long-time vi users' liking).

Buy the right keyboard, that decision is as important as the monitor,
and both are more important than the processor+disk.

I still use a Northgate Omni, ESC is close (I learned on the Kaypro II
keyboard, Alt is for newbies) and so are function keys.  You can remap
control, caps lock and one other and anyone that uses this keyboard
remarks on the 'feel'.  I have a stack of backups in the corner...


-- 
On a cloudy day,
You hear the cons cells whisper:
"We are lost and gone."  -- Oliver