6104 comments
2357 subscribers
6265 on Twitter
Subscribe! Feed reader E-mail

Emacs: Automating the insertion of text

As the VP Education of Toast I.T. Toastmasters in downtown Toronto, I’m responsible for assigning people roles in upcoming meetings and confirming these roles by e-mail. We currently do our scheduling in a spreadsheet. Copying and pasting the roles for the spreadsheet results in the following text:

Ari Caylakyan
Anthony D'Costa
Chris Charabaruk
Michael Chan
Chris Charabaruk
Chris Charabaruk
Khalid Ghaffar
Natasha Guigova



Ari Caylakyan - C&L 5
Anthony D'Costa
Jackie Achonu
Sacha Chua

Adding role descriptions to this was a bit of a pain, so I wrote a
short Emacs Lisp function that inserted descriptions if and only if
there was a corresponding person assigned to that role.

(defun sacha/toast-add-roles ()
  "Add role descriptions."
  (interactive)
  (mapcar (lambda (item)
            (goto-char (line-beginning-position))
            (unless (looking-at "^[ \t]*$")
              (insert item ": "))
            (forward-line 1))
          '("President" "Toastmaster" "Sgt at Arms" "Timekeeper" "Ah-counter"
            "Grammarian" "Table-topics Master" "General Evaluator" ""
            "Educational Speaker" "Guest Speaker"
            "Speaker #1" "Evaluator #1"
            "Speaker #2" "Evaluator #2"
            "Speaker #3" "Evaluator #3")))

Next step: Personalized e-mail that highlights upcoming roles, just as
I wrote Emacs Lisp functions to make it easier to send students
personalized feedback on their programs.

That’s one of the coolest things about Emacs – it’s so easy to automate tasks.

On Technorati: ,

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

On This Day...

  • 2012: Work is love made visible — Many people live for the weekends and see work as something that gets in the way of living. Many people [...]
  • 2011: Public transit day — Today was a day for buses, subway rides, and lots and lots of walking around. We’re helping J- learn how [...]
  • 2010: Getting the hang of leading small things — I’m working on an expertise location pilot for a group of IBMers around the world. My team members are [...]
  • 2009: Started my Improv 101 class! — Today was the first session of the 8-week Improv 101 series at Impatient Theatre, and I had tons of fun. Among [...]
  • 2007: Announcing: Book Snake blog! — New blog! I’ll be sharing my book notes over at Booksnake.sachachua.com. If you’ve ever wondered what I’m learning from the [...]
  • 2007: Learning languages — I enjoy learning languages. There’s something about straining to pick out one or two recognizable words from a stream of syllables, [...]
  • 2006: TorCHI social — As Gabriel Mansour went to all the trouble of e-mailing, texting, and calling me to make sure I got to TorCHI, [...]
  • 2006: New suitemate! — Krystal just moved in. I’ve seen her around Graduate House, but haven’t really talked to her much. She’s friends with Michelle, though. [...]
  • 2006: Neatening up — Having decided that helpless messiness is _not_ part of my core identity, I spent the entire afternoon sorting my room out. It’s [...]
  • 2006: New York recommendations? — Happen to know of good doctors and dentists in New York? Hilary Rowland’s moving to New York soon, and if anyone [...]
  • 2006: In case of emergency, break open stationery — I’m glad my mom insisted that I keep emergency giftwrap in my suite, that my sister taught me how to bake [...]
  • 2006: Remembering my purpose; hooray for writing! — I tried to go to sleep earlier than usual last night, and I was hit by a bout of existential angst. [...]
  • 2005: Milestone: first time to use a washing machine — I stood in front of the washing machine and carefully read the instructions. I was no stranger to washing my clothes, [...]
  • 2004: Overlay handling — I finally figured out what was zapping my Japanese input on Planner pages: an overzealous extents+overlays zap in emacs-wiki. I read through [...]

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!