Mac and Emacs Goodness

Posted by Doug Sun, 06 Mar 2005 04:36:00 GMT

I run a locally compiled version of CVS Emacs with the Carbon bindings. Overall it’s great. It takes me a long time to build Emacs though and I don’t update very often. My last compile was back in October of 2004. So, I decided to update today. What a nice surprise! One of my big pet peeves was fixed!

I’m getting more and more used to the Mac way of Cmd-c for copy and Cmd-v for paste. My problem has been there wasn’t a good way to do this in Emacs. I leave the control key defined as control and the Alt/Option key as Meta. My understanding was that the Command/Apple key wasn’t really available to Emacs. However, when I tried it today Emacs recognized Command/Apple as Alt. So, here are my Emacs settings to work on my Mac:

(setq mac-command-key-is-meta nil
      mac-pass-command-to-system t
      mac-pass-control-to-system nil
      mac-command-modifier nil
      focus-follows-mouse nil)
(global-set-key (kbd "A-x") 'kill-region) ; traditional "cut" 
(global-set-key (kbd "A-v") 'yank) ; traditional "paste" 
(global-set-key (kbd "A-c") 'kill-ring-save) ; traditional "copy" 
(global-set-key (kbd "A-m") 'iconify-or-deiconify-frame) ; minimize
(global-set-key (kbd "A-`") 'other-frame) ; cycle through emacs windows/frames
(global-set-key (kbd "A-n") 'make-frame-command) ; new emacs window/frame
(global-set-key (kbd "A-w") 'delete-frame) ; close window/frame

My buddy Dave has what seems like a really old Emacs. When he does ‘C-h k Cmd-k’ he gets “A-k is undefined” back. That means his Cmd key is defined as an Alt key and all these settings will work on his Emacs too. Maybe I could have had this working all along.

Posted in  | no comments

Updated save-buffer-same-timestamp

Posted by Doug Thu, 13 Nov 2003 05:27:00 GMT

Carla asked me to do a little bit of syntactical clean-up on some of her blog posts. Since she submits the stories via email, I need to edit them remotely on the server. I had previously written some stuff for EmacsAndBlosxom, but it didn’t work for remote files. Since Emacs:TrampMode alows you to edit remote files using ssh, I thought I’d update my save-buffer-same-timestamp to handle that. A little tricky, but all’s well that ends well.

Posted in  | no comments

Scrmablnig Txet

Posted by Doug Mon, 15 Sep 2003 02:45:00 GMT

JWZ posted some perl code to scramble text. I thought it was cute and decided to port his code to elisp. Take a look at Emacs:ScrmableSrtnig.

Posted in  | no comments

Older posts: 1 2 3 4 5 6 ... 9

Copyright 2001 - 2005 by Lathi.net and Doug Alcorn

Creative Commons, Some Rights Reserved Ruby on Rails Developer Powered by Debian GNU/Linux Powered by Typo