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

More Emacs coolness: List of contacts

This bit of Emacs Lisp code produces a Planner-ready list of the contacts displayed in the BBDB window.

(defun sacha/planner-bbdb-annotation-from-bbdb (&optional record)
  "If called from a bbdb buffer, return an annotation.
Suitable for use in `planner-annotation-functions'."
  (when (or record (eq major-mode 'bbdb-mode))
    (setq record (if record (car record) (bbdb-current-record)))
    (or (bbdb-record-getprop record 'plan)
        ;; From a BBDB entry with a plan page; use that. Yay!
        (planner-make-link
         (concat "bbdb://"
                 (planner-replace-regexp-in-string
                    " " "." (bbdb-record-name record)))
         (bbdb-record-name record)))))
(defalias 'planner-bbdb-annotation-from-bbdb 'sacha/planner-bbdb-annotation-from-bbdb)

(defun sacha/yank-planner-bbdb-list ()
  "Copy the list of people displayed in the buffer."
  (interactive)
  (kill-new
   (mapconcat 'sacha/planner-bbdb-annotation-from-bbdb
              bbdb-records
              ", "))
        (sacha/planner-bbdb-annotation-from-bbdb rec))

It allows me to say, for example, that I met 23 people yesterday:
Bruce, Daniel Charles, Shane D’Costa, Emily, Greg A. Fitz, Clara Fong, Jay Goldman, Harvey, Kai Fai Ho, Iris, KC, Charles McCulloch, Jamie McQuay, Joshua Meles, Naomi, Helen Overland, Wayne Penney, Simon Rowland, San, Colin Smillie, Solomon, Le Quan Truong, Perry Wong

On Technorati: , , , ,

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

On This Day...

  • 2012: Weekly review: Week ending August 31, 2012 — Lots of sleep this week. =) Lots of connecting with people, too, and lots of drawing! Looking forward to focusing on [...]
  • 2011: Transcript: Blogging (Part 1): Blogging and introverts — Hat-tip to Holly Tse for organizing this interview! After I transcribed it, I realized we managed to pack more than [...]
  • 2010: It’s okay if you can’t remember or spell my name; being human — Lifehacker had a recent post with tips on how to remember people’s names – generally useful tips, ground well-covered in [...]
  • 2009: A teacher’s guide to Web 2.0 at school [illustrated] — A Teacher's Guide To Web 2.0 at School View more documents from Sacha Chua.
  • 2008: Hacking the Domestic — W- and I unboxed and set up our very own sewing machine yesterday. It’s nothing fancy, just a Singer Simple [...]
  • 2006: More Emacs fun: Composing mail to everyone with notes — (defun sacha/compose-mail-to-everyone (&optional subject) (mapc (lambda (rec) (setq rec (car [...]
  • 2006: Emacs: Keep track of messages sent — Because a Big Brother Database of my contacts isn’t complete if I don’t keep track of what e-mail I sent them [...]
  • 2006: The great laptop ad campaign — BarCampEarthToronto was a blast, and so was my laptop ad campaign. It didn’t generate any qualified leads, but it did get [...]
  • 2005: Progress at cooking! — I had microwaved the chicken and slathered on barbecue sauce when I realized something important: I was out of cooked-and-frozen rice. [...]
  • 2003: Funky binder — I have printed out hard copies of some of the things I’m working on in school. Time to see how useful [...]
  • 2003: 今日 — 日本語 — アコースティックギターを一寸習いました。エリクさんは教えます。つまびで が楽しかったです。チョロヅが難しかったです。ギターより歌が好きです。でも、 習ってが良いです。 一昨日が妙です。 二人とスクラブルをしました。双方は私が好きでしょう。愛 しい一人と言いました。私は、あの事が未定です。
  • 2003: Hyperdictionary — Andy Sy posted a link to http://www.hyperdictionary.com .
  • 2003: Top Ten ways to combine fun and substance — From http://www.skylit.com/oop/FunAndSubstppt.pdf 10. Use gimmicks Provide a piece of Java code with a few syntax errors; finding and fixing these errors becomes an [...]
  • 2003: Array ideas — - The meaning of String[] args - Maybe some kind of game or the Caesar cipher. - Declaring, creating and using arrays - [...]
  • 2003: Slashdot Trolling Phenomena — Apparently, someone has written a fairly long description of common Slashdot trolls on WikiPedia#Slashdot_trolling_phenomena. Strange, strange.
  • 2003: SSH Tunnelling — Still no breakthrough. I’m trying to automatically set up SSH tunnels. Because sysads doesn’t like passphrases, I have to use expect [...]
  • 2003: Unofficial APT sources — http://www.apt-get.org

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!