December 18, 2008

Bulk view

Emacs, Org, and BBDB: Hyperlinking names to blogs

Back when I used Planner for Emacs, I coded some shortcuts to make it easier to write about the people I met and the conversations I had. I used the hippie-expand module to complete names from my Big Brother Database addressbook, and I wrote a function that converted those names into links to people’s blogs or websites whenever I published my blog posts as HTML.

I switched to WordPress for my blog because I got tired of trying to figure out a way to enable comments without getting mired in spam-fighting. That meant I could explore other Emacs personal information managers like Org, which I turned into my main task manager. I often used the WordPress interface to write blog posts. I sometimes used Windows Live Writer to write posts about books (there’s a good book review plugin that makes this easy). I also sometimes used Emacs and Org to draft blog posts using Org’s friendlier markup, exporting snippets to HTML that I then pasted into my blog posts.

Reading the posts on Planet Emacsen reminded me that my customized configuration was pretty darn sweet. That and the conversation notes I’ve been blogging lately encouraged me to dust off my configuration files and get them to work under Org. So here’s the code:

 (defun sacha/org-bbdb-get (path)
   "Return BBDB record for PATH."
   (car (bbdb-search (bbdb-records) path path path)))
 (defun sacha/org-bbdb-export (path desc format)
   "Create the export version of a BBDB link specified by PATH or DESC.
 If exporting to HTML, it will be linked to the person's blog,
 www, or web address. If exporting to LaTeX FORMAT the link will be
 italicised. In all other cases, it is left unchanged."
      ((eq format 'html)
       (let* ((record
             (sacha/org-bbdb-get path))
       (setq url (and record
                      (or (bbdb-record-getprop record 'blog)
                          (bbdb-record-getprop record 'www)
                          (bbdb-record-getprop record 'web))))
       (if url
           (format "<a href=\"%s\">%s</a>"
                   url (or desc path))
         (format "<em>%s</em>"
                 (or desc path)))))
      ((eq format 'latex) (format "\\textit{%s}" (or desc path)))
      (t (or desc path))))
 (defadvice org-bbdb-export (around sacha activate)
   "Override org-bbdb-export."
   (setq ad-return-value (sacha/org-bbdb-export path desc format)))
 ;;;_+ Hippie expansion for BBDB; map M-/ to hippie-expand for most fun
 (add-to-list 'hippie-expand-try-functions-list 'sacha/try-expand-bbdb-annotation)
 (defun sacha/try-expand-bbdb-annotation (old)
   "Expand from BBDB. If OLD is non-nil, cycle through other possibilities."
   (unless old
     ;; First time, so search through BBDB records for the name
     (he-init-string (he-dabbrev-beg) (point))
     (when (> (length he-search-string) 0)
       (setq he-expand-list nil)
        (lambda (item)
        (let ((name (bbdb-record-name item)))
          (when name
            (setq he-expand-list
                  (cons (org-make-link-string
                       (org-make-link "bbdb:" name)
        (bbdb-search (bbdb-records)
                     nil nil))))
   (while (and he-expand-list
               (or (not (car he-expand-list))
                   (he-string-member (car he-expand-list) he-tried-table t)))
     (setq he-expand-list (cdr he-expand-list)))
   (if (null he-expand-list)
         (if old (he-reset-string))
       (he-substitute-string (car he-expand-list) t)
       (setq he-expand-list (cdr he-expand-list))

If you’ve got Org and BBDB, drop this into your ~/.emacs and fiddle with it. =)

Hosting a teleconference call

Last Wednesday, I hosted a teleconference call for the first time. It was the December community call for IBM’s Web 2.0 for Business Community, and I wanted to bring people together and talk about the interesting things people had done over the last year.

Before the event, I set up an event post on Beehive (one of our internal social networking platforms), figured out how to send out a Lotus Notes message with a button to add the event to people’s calendars (thank you, Bernie Michalik!), and borrowed a teleconference line from Ian McNairn. I also reviewed the comments and updates people had shared on the event post, copying it into a list so that I could summarize things briefly.

I was so nervous before the call started. What if I couldn’t figure out how to start the teleconference call? What if I couldn’t get into the Sametime Unyte session that we were using to provide an e-meeting backchannel? What if I’d made a dreadful mistake on the teleconference invitation? Fortunately, I kept enough of my wits about me to upload the material I’d prepared and start recording the session.

When I got everything set up and I saw people joining, I felt so relieved. A number of people joined the call early. We waited for five minutes for more people to call in, but I didn’t want to leave that time as dead air, so I kept repeating the call details and adding some notes about Web 2.0 resources I’d heard about. I had a slide with all the call-in information and the (very short) agenda, and I invited people to start introducing themselves in the backchannel.

We started the agenda at 11:05 AM EST. I welcomed everyone again (sixth time, perhaps?). I summarized the updates that people posted. People jumped in with more details, questions, and other topics for discussion.

What worked well?

  • I liked having the call-in information posted on the first slide, to help people orient themselves and reconnect in case they were lost.
  • I remembered to repeat the questions from the e-meeting on the phone, because some people weren’t connected to the chat room.
  • I liked the way that the event post allowed us to start the conversation and get lots of material for the call.
  • I really enjoyed connecting the dots during the call, recommending that people check out various resources or talk to other people. I also appreciated how lots of people shared their thoughts, too. It reminded me a little of talk shows with call-in questions. =)

How can I make this even better?

  • I can start the session with lots of useful tips on the first slide, to reward people who come in early.
  • I can show people’s pictures so that they get a sense of who else is in the community.
  • I can ask people to type the interesting bits into the chat, creating instant minutes.

Good stuff!