Learning Emacs, part 0
I am probably going to try and learn Emacs... or at least enough of it that I can use it for everyday Scheme editing. Learning GNU Emacs seems like a good start. The problem is more, finding a version for Mac OS X that does what I want (like recognizing my custom keybindings for Home/End, for example). Carbon Emacs seems to do at least that, unlike some other versions that I've found. (It has other issues though, like not recognizing common Apple key bindings like ⌘Q.) More about this later. In the meantime, I'm still using vim. :-)
(Unrelated: I just realized that "the problem is more" is probably a Dutch-ism... but I'll keep using it anyway. :-)
John Cowan said,
February 14, 2008 @ 10:39 pm
Not at all. "The problem is more one of" would be more formal, but "The problem is more" is perfectly correct informal English.
creidiki said,
February 15, 2008 @ 6:19 am
What about aquamacs? Not that I've used a mac myself since the OS9 days...
Ozzi Lee said,
February 15, 2008 @ 9:09 am
As far as recognizing ⌘Q and other Apple key bindings, I map Command to Super within Emacs, and then map s-q to quit, s-s to save, etc.
I also map Option to Meta.
The relevant lines in my .emacs are:
(setq mac-option-modifier 'meta)
(setq mac-command-modifier 'super)
(global-set-key [(super q)] 'save-buffers-kill-emacs)
(global-set-key [(super w)] 'kill-this-buffer)
(global-set-key [(super s)] 'save-buffer)
(global-set-key [(super x)] 'kill-region)
(global-set-key [(super c)] 'kill-ring-save)
(global-set-key [(super v)] 'yank)
(global-set-key [(super a)] 'mark-whole-buffer)
(global-set-key [(super z)] 'undo)
I've got some others as well, but you get the idea.
Derrell Piper said,
February 15, 2008 @ 7:06 pm
Check out this implementation before deciding (http://emacs-app.sourceforge.net/). It's not as well known, but it's a nice trade-off between good Mac integration and classic emacs. Aquamacs is also a good option, if you can live with all its windows. (Classic emacs tends to do everything in one frame whereas Aquamacs tends to pop every new thing into a new frame. In some cases this is great, in others it's really distracting, especially to someone who expects the classic behavior.)
Also check out Quack (http://www.neilvandyke.org/quack/) for a good Scheme mode. The documentation referenes in Quack are stale, here's a patch to bring them up-to-date:
--- quack.el 2008-01-31 09:13:48.000000000 -0800
+++ quack.el.orig 2008-01-25 09:20:21.000000000 -0800
@@ -562,13 +562,13 @@
(chicken
"Chicken User's Manual"
- "http://chicken.wiki.br/The%20User's%20Manual"
+ "http://www.call-with-current-continuation.org/manual/manual.html"
;;"file:///usr/share/doc/chicken/manual.html"
nil)
(gambit
- "Gambit-C Documentation"
- "http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Documentation")
+ "Gambit-C home page"
+ "http://www.iro.umontreal.ca/~gambit/")
(gauche
"Gauche Reference Manual"
@@ -577,21 +577,22 @@
(mitgnu-ref
"MIT/GNU Scheme Reference"
- "http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/index.html"
+ "http://www.gnu.org/software/mit-scheme/documentation/scheme.html"
;;"http://www.swiss.ai.mit.edu/projects/scheme/documentation/scheme.html"
+
;;"file:///usr/share/doc/mit-scheme/html/scheme.html"
nil)
(mitgnu-user
"MIT/GNU Scheme User's Manual"
- "http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-user/index.html"
+ "http://www.gnu.org/software/mit-scheme/documentation/user.html"
;;"http://www.swiss.ai.mit.edu/projects/scheme/documentation/user.html"
;;"file:///usr/share/doc/mit-scheme/html/user.html"
nil)
(mitgnu-sos
"MIT/GNU Scheme SOS Reference Manual"
- "http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-sos/index.html"
+ "http://www.gnu.org/software/mit-scheme/documentation/sos.html"
;;"http://www.swiss.ai.mit.edu/projects/scheme/documentation/sos.html"
;;"file:///usr/share/doc/mit-scheme/html/sos.html"
nil)
@@ -636,7 +637,7 @@
"http://swissnet.ai.mit.edu/~jaffer/SLIB.html"
nil)
(faq "Scheme Frequently Asked Questions"
- "http://community.schemewiki.org/?scheme-faq"
+ "http://www.schemers.org/Documents/FAQ/"
nil))
"*List of specifications of manuals that can be viewed.
Hans Nowak said,
February 18, 2008 @ 7:12 pm
@Derrell: Sorry it took me 3 days to approve your comment, Akismet threw it in the spam bucket for some reason.
I looked at emacs-app... it uses Emacs 23 (as opposed to Carbon Emacs which uses 22), so I might want to look at that again in the future (when I am more familiar with Emacs).
Kevin Hammack said,
February 19, 2008 @ 6:11 pm
Aquamacs is truly your best option. It's based on the carbon emacs port, but it's beautified and groomed for OSX. It's also slightly bastardized, but that can be undone. If you like, email me and I'll dig through my .emacs when I get home and send you some useful tidbits for making aquamacs more like standard emacs.
I'd recommend against Emacs.app, it's still a bit flaky. I'm sure it will be fantastic one day; until then, especially if you're just learning emacs, stick to Aquamacs (or at least carbon emacs).