6091 comments
2357 subscribers
6240 on Twitter
Subscribe! Feed reader E-mail

BBDB: Print birthdates

This snippet goes through all the records in my Big Brother Database,
prints out birthdate and a link to the record, and then sorts the
results.

(defun sacha/bbdb-insert-birthdates ()
  "Insert a list of birthdates, sorted by month.
For best effect, dates should be of the form yyyy.mm.dd."
  (insert
   (with-temp-buffer
     (mapcar
      (lambda (rec)
        (when (bbdb-record-getprop rec 'birthdate)
          (insert
           (if (string-match "..\\...$" (bbdb-record-getprop rec 'birthdate))
               (match-string 0 (bbdb-record-getprop rec 'birthdate))
             (bbdb-record-getprop rec 'birthdate))
           " | "
           (planner-make-link
            (concat "bbdb://"
                    (planner-replace-regexp-in-string
                     " " "." (bbdb-record-name rec)))
            (bbdb-record-name rec))
           "\n")))
      (bbdb-records))
     (sort-lines nil (point-min) (point-max))
     (buffer-string)))
  nil)

On Technorati: , , ,

Random Emacs symbol: find-tag-noselect – Command: Find tag (in current tags table) whose name contains TAGNAME.

Short URL: http://sachachua.com/blog/p/4142

On This Day...

  • 2013: Quantified Awesome: Taking inventory of stuff in closets and drawers — “Did I buy that aviator hat, or was I just thinking about it? Did I give it away?” “Have you [...]
  • 2012: January 15, 2012 — This weekend brought a cold snap, or maybe this is regular winter in contrast to the mild days earlier. We [...]
  • 2011: Emacs 24 and the package manager — Update: Added (require ‘package) – thanks, Ryan! By default, the Emacs 24 package manager (M-x package-list-packages) points to a small repository [...]
  • 2011: Weekly review: Week ending January 14, 2011 — From last week’s plans Work [X] Finish up on project S [X] Start testing project M [...]
  • 2010: Microblogging talk — I’ve promised to give a short talk on microblogging for the knowledge and collaboration community (KCBlue) at work. Might be [...]
  • 2009: Diminishing returns on cat affection — Click on the image to view a larger version.
  • 2009: Travel tips — Here’s a braindump of tips for making frequent travel more fun: Learn a little of the language and culture. Look up [...]
  • 2008: Planning a talk! =) “”Networking 2.0: Blogging Your Way Out of a Job… and into a Career” — So it looks like I might be talking at the next Concordia University alumni event. Wouldn’t that be cool? Thanks [...]
  • 2008: — … And the MacBook Air, while interesting, doesn’t meet any immediate need (though I look forward to playing with one [...]
  • 2008: Not much writing today… — … but I’m glad to report that my mind is calming down a bit. At the very least, I’m getting [...]
  • 2008: My head is buzzing — My head is buzzing. Well no, not like a mosquito. Bouncing around, like a sugar-high rabbit in a cage. My [...]
  • 2007: What people don’t know about me — Toronto uber-girl-friend Quinn has just tagged me with the “5 things people don’t know about you” meme. Ordinarily I’d stick [...]
  • 2007: Returning to chess — I’ve missed playing chess. The chess books I’ve had since grade school are still on the bookshelves, waiting to be dusted [...]
  • 2007: My sister’s in love! — Synchronized movie dates, daily webcam chats, endless retellings of favorite moments—my sister’s in love, and distance is not a problem! They’re really [...]
  • 2007: On the road to growing up — I’ve signed up for 10 hours of driving lessons, starting at 8 AM tomorrow. It’ll be a refresher course—almost a complete [...]
  • 2007: Salesdogs: I’m a Chihuahua! — Are you turned off sales because you think everyone has to be a pit bull? When most people think of sales, [...]
  • 2005: Squeak talk — - Luca, from Italy. Been in Japan for 1 year. 4 months in Tokyo. Lived in Sendai. Working as a [...]
  • 2005: TLUG meeting: Knoppix — Today we have two presenters talking. Before we do that, we usually have new faces give a short introduction. - Craig. [...]
  • 2005: Planner poetry — I’m up to here with things to do   And buried under data The notes I keep all filed away,   The tasks—I’ll do them [...]
  • 2004: Status report — Kathy and I had a lot of fun with the videoke thing this evening. We tried Tragedy among other old songs. [...]

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!