Using emacs on Apple's PowerBook


#1

I apologize for the off topic post, but knowing that many ruby
programmers are emacs/PowerBook users, I don’t think this is
completely irrelevant…

For all you emacs/PowerBook users, how do you live with your
PowerBook? I’ve been thinking about buying a powerbook for four
years now but didn’t only because using emacs key bindings seems
extremely awkward on Apple’s laptops. On the lower left side of
powerbook, there is a ‘fn’ key which confuses my figures on the
correct positions of control/meta(option) keys. On the lower right
side of powerbook, there is no control/meta keys due to the placement
of near useless arrow keys.

I actually had expected someone would build/sell a customized
PowerBook keyboards tailored for emacs users by now… I am confused
since no other emacs users seem to be bothered by this. I really
think Apple should at least provide an option of the replacement
keyboard for emacs PowerBook users.

With the introduction of MacBook Pro and near ubiquitousness of WiFi
connection, my desire for a laptop couldn’t have been higher. Can
anybody who share this dilemma comment on this?

For those of you who think I’m a total nut for expecting Apple to
solve my person problem, emacs key bindings have been supported in
all text widgets of Cocoa applications ever since Mac OS X came out
and it’s only logical to expect their hardware to be designed in line
with their software features.

sorry for the rant,

daesan


#2

On Mar 19, 2006, at 9:55 PM, Dae San H. wrote:

For all you emacs/PowerBook users, how do you live with your
PowerBook? I’ve been thinking about buying a powerbook for four
years now but didn’t only because using emacs key bindings seems
extremely awkward on Apple’s laptops. On the lower left side of
powerbook, there is a ‘fn’ key which confuses my figures on the
correct positions of control/meta(option) keys. On the lower right
side of powerbook, there is no control/meta keys due to the
placement of near useless arrow keys.

System Preferences -> Keyboard and Mouse -> Modifier Keys: Set caps
lock to control. Use option as your meta key (not command). I like
the arrow keys on my powerbook. :wink:

– Daniel


#3

On 3/19/06, Dae San H. removed_email_address@domain.invalid wrote:

I apologize for the off topic post, but knowing that many ruby
programmers are emacs/PowerBook users, I don’t think this is
completely irrelevant…

http://aquamacs.org/

I bind meta to the cmd key, and suck up the unfortunate fact that
caps-lock is physically where ctrl should be. The old TiBooks had
swappable keyboards, but those were dumped starting with the Aluminum
Powerbooks for the ostentatious feature of backlit keys. Too bad a
3rd party market for alternative keyboards didn’t happen before; then
again, too bad the TiBooks stuck with ADB rather than diving into USB
(which is also powered).

Apple does LOTS of, imho, stupid things. (Let’s start with no FW800
on the MacBook, and Firewire dropped from the Nano and Video iPod…
Let’s continue with iTunes stopping receiving podcast subscriptions
because you haven’t listened to them “recently” enough (and no
preference to disable this “feature”)… or what a clusterfuck the
Quicktime framework perpetually remains, so that everyone ostensibly
uses VideoLAN… Oh yeah, and now they’re marketing some kind of iPod
boombox, instead of… say… an HDTV+DVD ripping Tivo-killer and
dedicated QTSS server. Oh, maybe we can start with something easier,
like maturing the Apache and ZeroConf (er, Rendezvous, er, I mean
Bonjour) integration so that end-users can EASILY publish web content
(like sharing files with friends) over the internet in a one-click
manner; you know, kinda like Cobalt/Sun did with the Qube over a
decade ago!

Or, hell, just offer a laptop with more than 2GB of RAM, please!

Of course, asking Apple to do better is like asking the Ruby community
to pull EMACS out of its EmacsLisp funk and re-implement a complete
replacement written in Ruby instead. (Because, we all love IRB;
RubEMACS is the next logical step.)

my .emacs includes:

;; Make the Cmd key the Meta key
(setq mac-command-modifier 'meta)

;; Merge Apple clipboard into Emacs killring
(setq x-select-enable-clipboard t)

;; One windowframe only for all buffers
(one-buffer-one-frame-mode 0)

;; Disable the toolbar
(tool-bar-mode 0)


#4

Actually, I’m not old enough of an emacs user to be accustomed to
caps-lock positioned control key. But how do you live without right
control/meta keys? Do you actually press ‘caps-lock + a’ with only
left fingers to move to the beginning of a line?

daesan


#5

On Mar 20, 2006, at 8:12 AM, zuzu wrote:

However, come to actually pause and think about it, I have developed a
completely rediculous left-hand shifting maneuver, where I use my
left-thumb to depress the ctrl or alt or meta key, and my left pointer
finger to depress the corresponding letter key (e.g C-a, C-e, Cx,
etc.) I’m probably already accustomed to this thumb-behavior due to
using the meta (cmd) key proper for OSX key-combos. It sure beats
having to rely on the “seeking” of a mouse, but I will concur that
such finger gymnastics falls far short of efficiency as well.

Uh, oh… That is exactly what I was afraid of happening when using
PowerBook… I think refusing to use laptops due to the key binding
issue like I have is rather ridiculous though… Yet I wouldn’t want
to jeopardize my computing productivity by giving up emacs key
bindings. Can larger emacs user population please stand up and share
your opinions on this issue?

Hey, we really should think about re-implementing emacs in ruby like
Sean mentioned. IMHO, Ruby is really a better lisp! :wink:

daesan


#6

On 3/19/06, Dae San H. removed_email_address@domain.invalid wrote:

Actually, I’m not old enough of an emacs user to be accustomed to
caps-lock positioned control key. But how do you live without right
control/meta keys? Do you actually press ‘caps-lock + a’ with only
left fingers to move to the beginning of a line?

daesan

These days I only practice my “correct” control-key with my “Happy
Hacker” keyboard, which isn’t often on my TiBook. The caps-lock is a
“special” key, in hardware, and produces weird sticky problems when
software attempts to fake it; so I don’t bother.

However, come to actually pause and think about it, I have developed a
completely rediculous left-hand shifting maneuver, where I use my
left-thumb to depress the ctrl or alt or meta key, and my left pointer
finger to depress the corresponding letter key (e.g C-a, C-e, Cx,
etc.) I’m probably already accustomed to this thumb-behavior due to
using the meta (cmd) key proper for OSX key-combos. It sure beats
having to rely on the “seeking” of a mouse, but I will concur that
such finger gymnastics falls far short of efficiency as well.


#7

On 3/19/06, Dae San H. removed_email_address@domain.invalid wrote:

Uh, oh… That is exactly what I was afraid of happening when using
PowerBook… I think refusing to use laptops due to the key binding
issue like I have is rather ridiculous though… Yet I wouldn’t want
to jeopardize my computing productivity by giving up emacs key
bindings. Can larger emacs user population please stand up and share
your opinions on this issue?

Hey, we really should think about re-implementing emacs in ruby like
Sean mentioned. IMHO, Ruby is really a better lisp! :wink:

daesan

My understanding is that EmacsLisp doesn’t even have closures. :frowning:

In addition to GNU EMACS being Free (Libre) Software, along with tons
of FSF documentation, here’s a digital copy of ‘The Craft of Text
Editing’ (a breakdown and discussion of the design of EMACS):
http://www.finseth.com/craft/


#8

On 3/20/06, Nicolas K. removed_email_address@domain.invalid wrote:

is a ‘fn’ key which confuses my figures on the correct positions of
connection, my desire for a laptop couldn’t have been higher. Can
daesan

I feel you pain. To add to this, I really can’t figure out how to make
the alt key become the Meta key in the terminal based emacs. I added the
(setq mac-command-key-is-meta nil)
but nothing works neither the apple key or the alt key is the meta key.
Did I miss something?

I think the issue here is the terminal emulation you’re using and the
preferences for Terminal.app. I’m rather certain a preference exists
to correctly pass the alt keycode (which EMACS will then recognize).
As, I sure do think having to use escape (Esc) for meta, sucks.


#9

Dae San H. wrote:

is no control/meta keys due to the placement of near useless arrow keys.

I feel you pain. To add to this, I really can’t figure out how to make
the alt key become the Meta key in the terminal based emacs. I added the
(setq mac-command-key-is-meta nil)
but nothing works neither the apple key or the alt key is the meta key.
Did I miss something?


#10

On Mar 20, 2006, at 2:27 PM, Nicolas K. wrote:

I feel you pain. To add to this, I really can’t figure out how to
make the alt key become the Meta key in the terminal based emacs. I
added the
(setq mac-command-key-is-meta nil)
but nothing works neither the apple key or the alt key is the meta
key. Did I miss something?

From Terminal.app’s menu select “Terminal” -> “Window Settings…”

Then from the drop down menu, choose “Keyboard” and check “Use option
as meta key”. Then press “Use settings as Defaults”. elisp
configuration for modifier keys only works for GUI based emacs.

I guess we really need some central repository of information for Mac
OS X emacs users… In the mean time, you might want to refer to
http://www.macosxhints.com

best,
daesan


#11

On Mar 20, 2006, at 8:57 AM, zuzu wrote:

My understanding is that EmacsLisp doesn’t even have closures. :frowning:

In addition to GNU EMACS being Free (Libre) Software, along with tons
of FSF documentation, here’s a digital copy of ‘The Craft of Text
Editing’ (a breakdown and discussion of the design of EMACS):
http://www.finseth.com/craft/

Great resource! I got to take a close look at this~ :slight_smile:

daesan


#12

Dae San H. wrote:

For all you emacs/PowerBook users, how do you live with your PowerBook?

See Brian M.'s post about aquamacs,

http://www.testing.com/cgi-bin/blog/2006/01/05#aquamacs

he used to maintain a version of emacs,

http://www.testing.com/cgi-bin/blog/2006/03/15#two-formative-experiences

Regards,


#13

On Mar 20, 2006, at 2:27 AM, Dae San H. wrote:

Then from the drop down menu, choose “Keyboard” and check “Use
option as meta key”. Then press “Use settings as Defaults”. elisp
configuration for modifier keys only works for GUI based emacs.

I guess we really need some central repository of information for
Mac OS X emacs users… In the mean time, you might want to refer
to http://www.macosxhints.com

best,
daesan

I’m not an emacs user, I’ve tried but I’ve been using vi-like stuff
since 1977 or something so… what can I say. However, the lisp
community is full of emacs types and OS X types with a significant
population of both. The lengths some of these guys will go is quite
astonishing. Bill Clementson, aside from having a great blog, has a
bunch of entries about running emacs on OS/X (see <http://
bc.tech.coop/blog/041024.html>, <http://bc.tech.coop/blog/
041029.html>, http://bc.tech.coop/blog/060116.html, and <http://
bc.tech.coop/blog/060131.html> for one series of articles). Anyway,
these guys in the lisp community have lots to say about it. I know
that a lot of people remap the keys and move the key tops on their
keyboard to match (but do this only after carefully considering
what will happen if you break one of the tiny attachments things on
a powerbook/powermac key – in other words, don’t).

If you want to run an X11 version of emacs you can pretty much do
anything you like, but it is going to be a pain to use (e.g. the clip
board in X11 is different than the one in OS X).

The other thing to consider is using something like aquamacs – a lot
of lisp folks have capitulated and gone that route. Most are
relatively happy, I guess it compensates leaving the terminal with
integration to OS X.

Good luck.

Cheers,
Bob


Bob H. – blogs at <http://www.recursive.ca/
hutch/>
Recursive Design Inc. – http://www.recursive.ca/
Raconteur – http://www.raconteur.info/
xampl for Ruby – http://rubyforge.org/projects/xampl/


#14

guys in the lisp community have lots to say about it. I know that a
lot of people remap the keys and move the key tops on their keyboard
to match (but do this only after carefully considering what will
happen if you break one of the tiny attachments things on a
powerbook/powermac key – in other words, don’t).

Even more OT, but if you break the prongs that hold the keys in place,
you can get them replaced for free at your local Apple store. I think
the techs there are rather used to seeing them break. If you don’t
have a local Apple store, I guess you’re a bit more out of luck, but
for a lot of people it’s not a big risk to remap keys.


#15

Dae San H. wrote:

I apologize for the off topic post, but knowing that many ruby
programmers are emacs/PowerBook users, I don’t think this is
completely irrelevant…

For all you emacs/PowerBook users, how do you live with your
PowerBook? I’ve been thinking about buying a powerbook for four
years now but didn’t only because using emacs key bindings seems
extremely awkward on Apple’s laptops. On the lower left side of

(I couldn’t resist)
My Powerbook G4 runs vim, textmate, and komodo fine.

The DuoCore ones seem to run really hot when they’re running Wynton
Marsalis HD screen saver.


#16

Thank you for all the comments regarding my earlier post. I really
appreciate them.

I would like to clarify couple of things though. In case it wasn’t
clear from my earlier post, I’ve been an emacs/Mac OS X user for some
time now and I am aware of most issues with using emacs on Mac OS X.

My concern this time is specifically about PowerBook’s keyboard
layout. The problem is that since it lacks right control/option
keys, I cannot, for example, press ‘right-control + a’ to move the
cursor to the beginning of the line. I would have to use my left
little finger to press left control key and use my left ring finger
to press ‘a’, for example. This kind of ‘finger gymnastics’ is a
highly unnatural and would lower my typing efficiency quite a bit,
I’m afraid.

The funny thing is Happy Hacking Keyboard, which many emacs fans seem
to prefer, also lack the right control key. Are emacs users
generally not using right control key? Am I really the only one who
would suffer from the lack of right control/option keys?

best,

daesan


#17

On Mar 20, 2006, at 8:38 AM, Nick S. wrote:

I think many folks who spend long periods of time in emacs map
capslock to
control so that control is on the home row where it was originally on
keyboards before the ps/2 era came along. I do that with all my
machines,
windows, os x, and linux alike :slight_smile:

/Nick

Yeah, I do that as well, and it’s really not hard to hit Caps-Lock +
A, just shift the hand a bit.

Tim


#18

On 3/20/06, Dae San H. removed_email_address@domain.invalid wrote:

The funny thing is Happy Hacking Keyboard, which many emacs fans seem
to prefer, also lack the right control key. Are emacs users
generally not using right control key? Am I really the only one who
would suffer from the lack of right control/option keys?

I think many folks who spend long periods of time in emacs map capslock
to
control so that control is on the home row where it was originally on
keyboards before the ps/2 era came along. I do that with all my
machines,
windows, os x, and linux alike :slight_smile:

/Nick


#19

At Mon, 20 Mar 2006 05:55:09 +0900, Dae San H. wrote:

For all you emacs/PowerBook users, how do you live with your
PowerBook? I’ve been thinking about buying a powerbook for four
years now but didn’t only because using emacs key bindings seems
extremely awkward on Apple’s laptops. On the lower left side of
powerbook, there is a ‘fn’ key which confuses my figures on the
correct positions of control/meta(option) keys. On the lower right
side of powerbook, there is no control/meta keys due to the placement
of near useless arrow keys.

I have an iBook, but I actually use Linux 99.9% of the time on it.
So, on linux with X, I just remap the small “enter” key on the right
to right control. Then I have the keyboard the way I like it. I tend
to use the left and the right control key, but only the left meta
key. But you could as well remap the command-keys to meta too of
course. It’s just what I’m used to.

I have used MacOSX exlusively on my iBook for a couple of months.
However, I just ended up running a full screen X server with fluxbox
and using emacs on X. You can remap keys with xmodmap in the X
server. You can actually do that even if you don’t use X fullscreen.
(thus the windows from the X server just look like native OSX windows)
It does mean that you need to use an Emacs which runs on X. If I
remember right, you can select text and use the menu of the X-server
to copy-paste with native OSX applications. You’ll notice however
that X-applications are, what I call, second class citizens on
OSX. You can install an X version of emacs with darwinports.

Anyways, if I need to use OSX these days, I use the emacs from
http://homepage.mac.com/zenitani/emacs-e.html, which is a recent
version from cvs bundled with a number of packages. This is more to
have a decent editor, just in case I need one. It’s not comfortable
to use for me due to the keyboard layout. As a “native” OSX Emacs, it
is a nice package though. I’m not sure, but I believe you can
configure it to use the Command key as Meta (which gives you left and
right Meta).

And then there’s also a couple of utilities for OSX to remap keys (OSX
Tiger has a built-in feature to remap some modifier keys).

  • DoubleCommand from http://doublecommand.sourceforge.net
    a kernel extension which allows you to do certain key remappings
    I used this for awhile for enter->right control mapping
    However, if I remember right, it was not very stable in the sense that
    it
    would sometimes lose the remappings after some time. And you have to
    be careful when doing upgrades: if the kernel has been updated, the
    kernel extension cannot be loaded anymore, and you can only boot in
    safe mode. But this is documented on the website. (you can disable
    the extension when booted in safe mode)
    (don’t take my word about the stability, this is some time ago with
    the first version of doublecommand for OSX Tiger)
  • uControl
    The website is currently down, but this is another tool to remap
    keys under OSX. Didn’t try this though.

I hope this helps…

Ruben


#20

At Tue, 21 Mar 2006 01:50:07 +0900, Timothy B. wrote:

/Nick

Yeah, I do that as well, and it’s really not hard to hit Caps-Lock +
A, just shift the hand a bit.

Tim

Like the original poster, I use the right control key. I’m just lost
without a right control key. It’s a habbit of course, but once you’re
used to it, it’s hard to change. Things like C-x C-f, C-a, C-e, C-g
just seem to go easier with two hands.

Ruben