emacs

Save Emacs Macro

Snippet

M-x is command / meta

^x ( to start recording a macro
^x ) to stop recording a macro

M-x name-last-kbd-macro to name the last macro run

Open ~/.emacs, move the cursor to the bottom of the file M-x >

M-x insert-kbd-macro to insert the lisp code for a named kmacro at the cursor position.

Save the file.

In any future emacs session, M-x new-macro-name just like any emacs command.

# see above

Use Command as Meta for Emacs on OSX

Snippet

Emacs 23 doesn't use Command ⌘ for the Meta keystroke, requiring using option / alt for the normal keystrokes. Blech. Fix that.

This rather assumes you're using the emacs from http://emacsformacosx.com.

Add this to your ~/.emacs

    (setq mac-option-key-is-meta nil)
    (setq mac-command-key-is-meta t)
    (setq mac-command-modifier 'meta)
    (setq mac-option-modifier nil)

Emacs spaces instead of tabs

Blog

Into the ~/.emacs file:

;; spaces instead of tabs
(setq-default indent-tabs-mode nil)

New processes not so hot

Blog

I've been using ecto to compose my blog posts since just before SxSW. It works well in that it enables me to write easily offline, but not necessarily any better than I would write if I were using, say, emacs, my favorite editor. The problem with emacs, though, is the over developed, and often overused, left pinky, from which not only can I do one armed pull-ups, but I can also thwart the most deadly ninja assassin with a pinky flick from my left hand.

Yes, emacs is that good of a pinky trainer.

The problem with using ecto, however, is that to me, I've blogged. I wrote what I needed to write, I've managed to get the words out of my system, and I'm done. Nothing like vomiting words onto a screen and thinking, whoo, that sounds good.

I'm not sure I'll stick with ecto, as a result. I'll need to get some process down to make this easier. I know I want the automatic upload of all of my pictures to a server, which doesn't need to be Flickr, though might be. No reason why I can't add in various easy-posting features ala Vox, while I'm at it.

In that copious, illusory, fleeting and mercurial, mythical entity called "free time."

OmniOutliner Pro keyboard shortcut disable

Blog

After who knows how many tries, fits and stops, I finally have what I consider a working unix laptop with my shiny MBP. I like it a lot, as I slowly force it to submit to my will (read: works the way I started working when I was on an SGI IRIX box ten years ago).

Emacs and the terminal window were the two hardest parts to get right. I become very cranky if a system I'm using doesn't have emacs on it (try as I might to switch to vi/vim/gvim at Andy's suggestion and with his help). I become even more cranky if I have to use a mouse on a regular basis to navigate amongst windows: splat-tab is fine, I can even use splat-tilde to navigate through windows of the same application. But force me to use a mouse exclusively to change applications and watch the laptop fly through the air and most likely out the window.

So, when the new install of OmniOutliner Pro overwrote one of my frequently used emacs keystrokes (splat-greater than, or splat-shift-period, which sends the cursor to the bottom of the editing buffer/window or the end of the document in Word speak), I became very, very cranky.

Turns out splat (or flower, or apple, or command, it's all the same key on an Apple keyboard) > is the OmniOutliner Pro Service call to "Add to clippings," essentially copying the system clipboard to an outliner. If OmniOutliner Pro, eh, screw that name, if OOP is installed, this service is installed, and it can't be modified, can't be disabled via the OOP application.

And won't send the keystrokes to emacs.

Fortunately, on the OOP forums, another person had a different OOP service that frustrated him, and Troy B of Omni pointed him to ServiceScrubber, another app that will overwrite the keystroke overwrite.

Download, double-click, double-click, drag, splat-space, s e r *return*, scroll, uncheck, splat-s, splat-q and I'm back in business.

As uncomfortable as I am about installing small random applications on my computer, the mac part not-withstanding, this and DoubleCommand, which Doyle found for me, are the two tiny apps I'm glad I have on my system. I'm very happy other people are scratching those itches and a few dollars via paypal means they're scratching my itch, too.