April 17, 2007

Bulk view

How to use Emacs to keep track of your bibliography and notes: anatomy of an Emacs hack

Keep your records in BibTeX, which is a text-based tool for
keeping track of bibliographies. BibTeX really shines when you use it
with TeX or LaTeX because you can cite papers by typing something like
“\cite{chua07}”. It will automatically publish your bibliography in
any of the popular formats, sorting it however you want and including
only the papers you actually referenced. Major paper libraries like
the ACM Digital Library can export bibliographic records as BiBTeX.
You can also use bibtex-mode to help you create records. Assign short,
memorable keys to the BibTeX records. I usually use the first author’s
last name together with the year of publication, with a few more
characters if I need to disambiguate.

You can keep your notes about papers in whatever format you want. Just
add a line like “\cite{chua07a}” to make it easier to paste the
citation. I put my notes into a fortune file (chunks delimited by % on
a line by itself) because whenever I get writer’s block, I like
retrieving random notes using the fortune command. I usually highlight
selections from the PDFs, paste them into my Emacs buffer, and add the
\cite… note. I keep exact quotations so that I can paraphrase them
any way I want when I write the document. Sometimes I’ll add comments,
which I visually distinguish from the quote so that I don’t get
confused. You can also add keywords to your notes and use M-x
occur
or grep to find matching quotes.

When it’s time to work on your paper, keep your citation notes close
to the statements as you paraphrase them for your paper. The best way
to take advantage of the data you have is to use LaTeX, a powerful
typesetting system for scientific papers and books. It’s well worth
learning and it’s the standard in many scientific circles. Even if you
use OpenOffice.org or some other word processor, though, you can still
take advantage of your notes: just make sure you copy the citations
into your bibliography.

—-

So that’s the basic way to do it. Of course, I’ve been accumulating
various Emacs hacks for managing my bibliography, and they’re all in
../emacs/research-config.el.

The first thing I noticed was that I was typing \cite{someid} all the
time. Hmm. There must be a way I could just take that information from
my BibTeX file… So I wrote a function that allowed me to mark a
BibTeX record as the current paper I was reading.

(defvar sacha/research/quote-default ""
  "Stores the BibTeX key for the paper I'm currently reading.")
(defadvice bibtex-clean-entry (after sacha activate)
  "Set default key based on the current record."
  (setq sacha/research/quote-default (bibtex-key-in-head))
  (set-register ?a (format "\n\\cite{%s}\n%%" sacha/research/quote-default))
  (set-register ?b sacha/research/quote-default))

Okay. That meant I could just insert the register with C-x r i a. This
wasn’t really that much of an improvement, so I thought about making a
function that pasted the text, added the citation, and added the %
that separates entries in fortune files.

(defvar sacha/research/quote-file "/home/sacha/notebook/research/quotes"
  "File with my research notes.")
(defun sacha/research/quote ()
  "Paste the quote into `sacha/research/quote-file'."
  (interactive)
  (with-current-buffer (find-file-noselect sacha/research/quote-file)
     (goto-char (point-max))
     (yank)
     (unless (bolp) (insert "\n"))
     (insert "\\cite{" sacha/research/quote-default "}\n%\n")))

I have lots of other functions to keep track of read entries (moving
the papers into a separate folder!), count papers read and remaining
(good for morale when you see the numbers decreasing, and for a while
I was publishing the numbers on my blog!) and even quickly browse and
tag quotes. =) You can check out ../emacs/research-config.el for
more inspiration.

And yes, this is what I do when I want to procrastinate working on my
thesis…

Random Emacs symbol: memory-signal-data – Variable: Precomputed `signal’ argument for memory-full error.

Oooh! The banig is so pretty!

My mom sent me a woven mat. It’s so pretty! I’ve set it up by the side
of my room. If I put a few cushions beside it and the drawers, then
people might be inclined to sit there. The cushions I have right now
are a little too big, but something small and black would do nicely.

I’ve written a thank-you note to the people who mailed it to me, and
will drop it off in the mailbox on the way out. Yay!

Random Emacs symbol: cd-path – Variable: Value of the CDPATH environment variable, as a list.

Book recommendation: The Ten-Minute Trainer

Bowman. 2005. The Ten-Minute Trainer. Pfeiffer.

Training shouldn’t be hour-long lectures that bore people who are more
used to television’s ten-minute chunks of content. The book The
Ten-Minute Trainer
is full of ideas for quick one- and five-minute
activities that you can use in between chunks of content to connect
participants, introduce or reinforce what you’re teaching, and liven
up your next training session. I took so many notes while reading it
because it just kept giving me all these wonderful ideas for
workshops. I’m looking forward to trying these things out!

I’m giving a workshop on blogging at the Mesh conference, and I can’t
wait to use the exercises described in this book to help the
conference participants really make the most of their time. =)

Two thumbs up. Every trainer and teacher should at least leaf through
this book.

Random Emacs symbol: mail-extr-disable-voodoo – Variable: *If it is a regexp, names matching it will never be modified.

Book recommendation: Light Their Fire

Drake, Gulman and Roberts. 2005. Light Their Fire. Dearborn: Chicago, IL.

Light Their Fire shows the importance of internal marketing as
a way of filling employees with enthusiasm. When employees are
positively passionate about the company, they deliver awesome customer
service. It contains tips on how to spread good news and bad news.
Make a big deal of good news. Kick your celebration up a notch to make
employees feel terrific. If you have to share bad news, make sure
you’re prompt and honest and address people’s anxieties. The book also
has tips on using training as a form of internal marketing and
social-network building. Well worth a read for managers and corporate
communication types, particularly combined with the Better Than
Perfect
book I read recently.

Random Emacs symbol: gnus-article-strip-all-blank-lines – Command: Strip all blank lines.