Wednesday, October 31, 2007

linux,windows,linux,mac

Spectrum-Amiga-WIndows-Linux-Windows-Linux-Mac, this has been my Operating System periple. Some time ago I wrote a blog post entitled 'switch back to windows', when I recalled windows sucks, I got back to linux, and new I've got a mac with a Leopard in it.
In editors, I've been using VI *a lot*, also Eclipse *a lot*, then I learned EMACS and I loved it.

becaus I'm learning ruby, I have a mac, I bought TextMate, as all of the rails core developers use MAC with TM. 39 euros.
It works quite nice, but EMACS is OSS, so it has far more plugins, modes, and stuff. I got used to emacs keybindings, so after having spent 39 euros on TM, I'm sticking to EMACS again. It's just more powerful and it helps you to learn LISP which is also a plus.

Aquaemacs has nothing to envy to textmate. its MAC-OS look'n'feel, with keybingings, integration with OS and the like.

But its a *fkin* hell to configure it with the META symbol bound ALT key, and then also get the ç, {, }, á, ] and all that stuff, this was my first approach:
(when (eq system-type 'darwin)
(progn
(setq mac-option-modifier 'meta)
; (setq mac-pass-option-to-system t)
;and because the last statemet, we need all this weird stuff... no AltGr in mac!
(global-set-key "\M-`" (lambda () (interactive) (insert "[")))
(global-set-key "\M-+" (lambda () (interactive) (insert "]")))
(global-set-key "\M-7" (lambda () (interactive) (insert "\\")))
(global-set-key "\M-´" (lambda () (interactive) (insert "{")))
(global-set-key "\M-ç" (lambda () (interactive) (insert "}")))
(global-set-key "\M-1" (lambda () (interactive) (insert "|")))
(global-set-key "\M-2" (lambda () (interactive) (insert "@")))
(global-set-key "\M-3" (lambda () (interactive) (insert "#")))
(global-set-key "\M-4" (lambda () (interactive) (insert "~")))
(global-set-key "\M-º" (lambda () (interactive) (insert "\\")))
(global-set-key [(control return)] 'set-mark-command)))

but couldn't get the { and } to work, but I'm thinking the best will be to switch off the (setq mac-option-modifier 'meta)

UPDATE
I seem to have found the solution, just look at site-lisp/macosx/emulate-mac-keyboard-mode.el
and you'll see how to modify your .emacs to achieve the beautiful { and } and \ with your aquaemacs with spanish keyboard :D

4 comments:

David Reitter said...

Why not contribute your spanish keybindings back to the Aquamacs project? Send e-mail to aquamacs-devel@aquamacs.org !

siboc said...

Hey Eli, Why did you go to mac? you where in linux it was not ok for you? is just curiosity? are you becoming more "snop"?

mb (your primo.net)

elias said...

I fear I'll be requested to register in the mailing list and all the boring stuff, that's why I didnt do it at first and instead pasted the solution in emacswiki.org/something/aquaemacs

I just sent the email to aquamacs-devel@aquamacs.org, I hope the email is accepted w/o needing the registration step and so.

elias said...

Linux is too heterogeneous. Its good for working, but when I download a movie from somewhere, I just want to watch the movie and hear the sound. COnfiguring modules and kernels to get multimedia working on linux is a pain in the ass, as well as burning CDs.
If you get yourself a good Graphics Card, you're not going to take the 100% performance nor features from it, cos linux drivers are reverse-engineered and cant suck all the power from the card.
I guess that using a MAC feels like "Peace of Mind":
-things work the first try
-doesnt hang
-fully multimedia
-(almost) no configuration files to tweak


and you have:

-a pure UNIX (freeBSD) with all your familiar tools.
-a great GUI
-almost all the software for linux works on MAC (if its posix, and there are emulators).

also the hardware design of the mac is insanely thought-of. its light, small, great screen, super-soft keyboard, great sound, wifi works great, battery last very long. Its just a great product.

now with leopard, I have DTrace, which is a GREAT software for developers that SUN invented. (someone's trying to port it to linux).

and I dont think its *that* much expensive. I bought a refurbished macbook pro, 15", 2Gb ram, core2duo, super graphics card. It was 2400 i got it for 1800.
The PCs I was looking at were around 1200 (vaio). the 600 euros gap is really worth it.