Headlines for Thursday:



1. Emacs BBDB magic: Greeting people with nicknames: 13:06

I use Gnus to read my mail within the Emacs text editor. One of the advantages of using a mail client that's infinitely programmable is that you can add all sorts of little tweaks to it. Gnus can be integrated with Emacs' Big Brother Database (BBDB), a semi-structured text database in which I store all sorts of weird notes. This little hack takes the nick field of the database and automatically inserts a greeting. If someone signs himself as Mikong, I should call him that instead of Joseph Michael. Similarly, I sign my messages as Sacha, not Sandra Jean. This little tidbit makes it easier to remember to call people by their nicknames.

(defun sacha/gnus-add-nick-to-message ()
  "Inserts \"Hello, NICK!\" in messages based on the recipient's nick field."
    (let ((bbdb-get-addresses-headers (list (assoc 'recipients bbdb-get-addresses-headers)))
      (setq nicks
            (delq nil
                  (mapcar (lambda (rec) (bbdb-record-getprop rec 'nick))
                           (bbdb-get-addresses nil gnus-ignored-from-addresses 'gnus-fetch-field)
      (goto-char (point-min))
      (when (and nicks
                 (re-search-forward "--text follows this line--" nil t))
        (forward-line 1)
        (insert "Hello, "
                (mapconcat 'identity nicks ", ")

(defadvice gnus-post-news (after sacha activate)

On Technorati: , , ,

Random Japanese sentence: 虎を大きな猫というなら、同じように猫を小さな虎といってもよい。 You may as well call a cat a small tiger as call a tiger a big cat.

2. Pimp My Emacs: 17:06

Along the lines of TV shows like Pimp My Ride, I'm thinking of regularly blogging something along the lines of Pimp My Emacs. For those readers who haven't had to listen to me bubble for hours on end about this text editor / way of life, Emacs is ostensibly a program that you use to edit text files. Right. But because it's insanely programmable, there are all sorts of interesting things for it, like more than five ways to read one's e-mail.

Watch for it on Technorati with emacs or pimpmyemacs, or subscribe to http://feeds.feedburner.com/pimpmyemacs . =)

On Technorati: ,

E-mail sent

  1. Mathew Ingram: Re: BarCamp / Enterprise20Toronto, tonight, 6:30, Rowers Pub on Harbord
  2. Michael Randall: Re: sachawiki: 2006.07.03
  3. Gabriel Mansour: Re: sachawiki: 2006.07.04
  4. Don Marti: Re: new project on emerging economies
  5. Don Marti: Re: LinuxWorld
  6. Dan Howard: Re: Your SMS's last night
  7. alice servera: Re: Kamea's party Sat July 29 6pm chez Alice and Mike
  8. Ari Caylakyan: Re: August 1 - open for speech module?
  9. Chelsea Taylor: Re: Dream in High Park
  10. vinzer x.: Re: sachawiki: About Me
  11. Michael Randall: Re: sachawiki: 2006.07.03
  12. phawk: Re: sachawiki: 2006.06.28
  13. Tom: Re: sachawiki: 2006.06.28
  14. Jay Goldman: Re: sachawiki: 2006.07.04
  15. Gabriel Mansour: Re: sachawiki: 2006.07.04