GMail mailing list fail

Google has the image of a hacker-friendly company, a company that despite its growth still (occasionally) listens to its advanced users. Google is also an active Open Source contributor.

Why oh why, then, does GMail still not have a “reply to list” functionality? It’s been requested many times, and if it was offered as a Google Mail Labs feature, it wouldn’t clutter the interface for non-technical people. How do the Google engineers themselves participate in mailing lists, by cutting and pasting between the Cc: and To: fields?

Seriously, it’s about time.

Rant off.

Simple Frame Initialization

Is anyone else confused by the variety and complexity of packages for Emacs session management out there? I read through some of the documentation recently, but in the end I was overwhelmed and didn’t install anything.

Session management is about open files, buffer positions and the like on the one hand, and about the frame configuration on the other hand. I realized that my actual use case for frame session management was so simple that I could trivially implement it myself.

All I really wanted was that my Emacs would launch in fullscreen, and split it into two or three vertical windows, depending on whether I was using the laptop screen or the larger external screen. If I could accept the two-split as default, and run a function to create the three-window setup when needed, then all I’d need were some small initialization functions.

Like almost everything else, Emacs exposes its window and frame handling in an ELisp API. So here we go:

(defun my-big-screen ()
  "Set up frame for external screen, with three windows."
  (my-initialize-frame 3))

(defun my-small-screen ()
  "Set up frame for laptop screen, with two windows."
  (my-initialize-frame 2))

(defun my-initialize-frame (columns)
  "Set current frame to fullscreen and split it into COLUMNS
vertical windows."
  (set-frame-parameter nil :fullscreen t)
  (dotimes (not-used (1- columns))

This is not rocket science and I hope it didn’t bore the Planet Emacsen readers, but maybe it encourages people to get creative with their Emacs’ frames and windows. Start with the Emacs Lisp manual, chapters 28 (Windows) and 29 (Frames).

Land of Lisp

I’m pretty excited about an upcoming book, Conrad Barski’s Land of Lisp. The book will teach Lisp through implementing and refining a couple of games, and it will feature a back story told in lots of cartoons. Sounds like fun!

The publisher now has a video recording of Conrad’s presentation at Philly Lambda online. I watched it last night, and am even more intrigued now. Conrad shows some awesome comic panels and some really interesting code. Besides hilarious games such as Grand Theft Wumpus, lots of other software from a web server to an SVG generator will be implemented. One game will be refined in four steps, from a C-in-Lisp-syntax kind of stateful, iterative style to a truly lispy style using macros.

I had the pleasure to meet Conrad at a FringeDC meeting in September, and had a great evening with the fringers. (Not surprisingly, Conrad founded the group; not to mention created the site and all its content and drew the Alien Lisp mascot.) As you might see in the video, Conrad is a witty and unpretentious guy and I’m sure it will show in the book.

Now focus!

I’m having fun with this bit of Emacs Lisp that turns your current buffer in a fullscreen, minimal, no-frills frame a la Writeroom. I got it from the EmacsWiki and made a few small modifications.

Now, whenever you feel distracted, tell your Emacs (and thus yourself, as Emacs is a direct extension of your brain): now-focus!.

(defun now-focus! ()
  "Open the current buffer in a frame without any bling."
  ;; to restore:
  ;; (setq mode-line-format (default-value 'mode-line-format))
  (let ((frame (nowfocus-make-minimal-frame)))
    (select-frame frame)
    (setq mode-line-format nil)
    ;; for Windows, untested
    (when (fboundp 'w32-send-sys-command)
      (w32-send-sys-command 61488 frame))))

(defun nowfocus-make-minimal-frame ()
  (make-frame '((minibuffer . nil)
		(vertical-scroll-bars . nil)
		(left-fringe . 0)
		(right-fringe . 0)
		(border-width . 0)
		(internal-border-width . 64) ; whitespace!
		(cursor-type . box)
		(menu-bar-lines . 0)
		(tool-bar-lines . 0)
		(fullscreen . fullboth)
		(unsplittable . t))))

If you’d like some more options, turn to darkroom-mode.

EXIF metadata and iPhoto 6

I might be behind the times, but for people stuck with iPhoto 6, here’s a quick guide to getting your photo titles, keywords, comments, and a copyright notice into the EXIF header of your image files.

The AppleScript that works for me is from Andrew Turner. I modified it as described in this comment to enable apostrophes in keywords. In addition, my installation of exiftool from Fink only works from AppleScript when giving the complete path and the location of its libraries, like this: PERL5LIB=/sw/lib/perl5 /sw/bin/exiftool. Also, don’t forget to change the copyright notice at the top.

Save the script in ~/Library/Scripts and make it available by checking “Show Script menu in menu bar” in AppleScript Utility. Now you should be able to select photos in iPhoto and run “Set Exif Data” from the AppleScript menu in the menu bar on them.

By the way, if you’re stuck with iPhoto 6, you almost certainly want Ken Ferry’s excellent Keyword Assistant for iPhoto.