20. (semi)form letters: hooray for open source!: 23:35

I needed to write 31 thank-you-for-attending-my-send-off-party e-mail
messages. Instead of having a generic letter that I'd send to lots of
people all listed in To: or Bcc:, I decided to personalize it a bit by
including their nicknames, two-year goals, and a personal message I'd
add to each letter in different places.

Fortunately, my mail client was up to the task. One of the benefits of
having both your contact information and your mail client in an
easily-programmable environment is that you can hack together a quick
program to do exactly what you want.

I had typed everyone's two-year-plans into my contact information
manager's Notes field following a special format. It was the work of a
few minutes to record and run a macro that extracted the data and
created a signature for each person who attended my send-off party.

I then wrote a couple of short functions that looped over the
currently displayed contact records and drafted messages for each of
them following a template.

This resulted in 31 drafts I could edit and send without hassles. Much
fun!

For future reference (and for the handful of Emacs geeks or learners
in the audience), here's the code I used to make it all happen:

I used M-x local-set-key to bind sacha/bbdb-send-form-mail to M. * M
then applies the function to all displayed records.
../emacs/miniedit.el makes it easy to edit long strings in the
minibuffer, and that made the template much easier to write.

Emacs totally rocks. Nothing else has ever given me this much power.

自動車製造は人間の労働者に代わって、コンピューターが組み込まれたロボットによって行われている。 Car manufacturing is carried out by computer-programmed robots in place of human workers.

19. Working with Emacs: 12:12

A recent post on the Philippine Linux Users' Group suggested a
separate plug-emacs mailing lists for all the Emacs messages that have
popped up recently. The suggester said:

There is a
difference between discussion and stroking each other's ego. :)

Working with Emacs is a humbling experience. It brings you face to
face with accumulated centuries of developers' work. Emacs involves
people in its development to an unusual extent. Working with vi and
even Eclipse made me feel more like a user than a co-developer.
Working with Emacs made me feel part of the community, even when I was
still struggling to make sense of the parentheses.

If in that sense, Emacs worship is considered ego-stroking, then sure,
I'm guilty. I can't help but express my appreciation for one of those
things that has really changed my life and made free, open source
software really meaningful to me. For the culture, really, that made
it possible. It's a piece of software, but it's also a conversation
with so many developers around the world.

To newbies: if you're curious about the thrills of open source
development and you want a nice, easy way to get started, why not try
modifying Emacs? It's easy to pick up. All the source code is there,
and you can modify it on the fly. We've had complete non-programmers
try it out and fall in love with programming. They get thrilled when
they share their tweaks and other people respond with comments and
suggestions. This is good stuff. Try it out. =)

I suppose Emacs is off-topic. After all, it's cross-platform, not
Linux-specific. I could easily be extolling the wonders of Emacs on
Mac OS X, Microsoft Windows, or BSD. Emacs doesn't require Linux.
(Neither does Apache, but you don't see people waxing lyrical about
web servers that often, do you?) The flood of Emacs-related posts that
deluge the list whenever someone unwittingly brings up the topic is
probably incomprehensible to people who've never tried Emacs or tried
Emacs as just an editor and didn't like it.

Still, I want to share what makes open source real for me. Not kernel
hacking, which is still too intimidating despite the existence of
projects like kernel-janitor. Not network or system administration,
which I don't have the patience to do. Just the free and flexible
customization of something I use everyday and the thrill of sharing
these customizations with other people in a community that spans the
world.

I guess that's why I post on PLUG instead of plug-misc. I don't think
PLUG should just be a venue for asking and answering technical
questions, but also for sharing nifty hacks and examples of how far a
Linux system can be pushed. Other people push their systems in terms
of hardware and services. I push mine in terms of how well it can fit
me, how well it can anticipate my needs.

I want to stroke other people's egos. I want people to discover how
they can contribute to free and open source software, to experience
the thrill of seeing their code out there and being used. Open source
development isn't just for PHP wizards or C freaks who can contribute
to existing projects or launch an entirely new project on their own.
Maybe--just maybe!--people who thought themselves just users of a text
editor will be inspired to think about how they can start customizing
their own.

I can't help but agree with you. Emacs is the way that I
appreciated FOSS more compared to GNU/Linux per se. Why? It's because
I easily felt part of the community of Emacs users and hackers on the
Emacs Wiki. That kind of interaction makes it less scary for newbies,
IMHO. I mean, not all people on the Emacs Wiki are very friendly, I
suppose, but the ones I have interacted with as I was learning to use
various tools and modes available showed me that I can do something
for the FOSS community, which is to write about what I learn. I don't
even know ELISP but at least I know that my blog entries are helpful
to others too. =)

I guess we have been too giddy over Emacs on the PLUG mailing list
that is why someone suggested that. Well, I know I have always been
giddy about it but I can't help myself! ^_^ Emacs is wonderful...

Besides there are so many hacks in Emacs that make FOSS usage,
learning and advocacy so much fun! Like the Planner mode that allows
me to somewhat organize my life, my thoughts, my schedule. Eshell
allows me to do some things without opening a separate terminal. In
Planner, I also store my notes on advocacy and my blog entry drafts. I
also listen to music on Emacs. And when something goes wrong on
whatever mode I am using, I can email the maintainer immediately, to
tell him/her what happened so that the bug can be fixed, etc. I try to
be as detailed as possible when I do that. So I guess that is my
contribution. =)

In any case, I also enjoy the company of people using Emacs, not just
because we talk about Emacs but because I am learning so much about
you guys =)

13. Task management with Emacs: Text files: 09:58

With the wealth of code available for Emacs and the ease of
customization it provides, you're certain to find a task management
tool that fits the way you think. Over the next few days, I'll provide
a quick run-through of the methods I've tried out.

The simplest way to get started with Emacs for task management is to
keep your TODOs in a plain text file, like ~/TODO. You can keep this
text file in any format you want. To make it easier for you to see
what you need to do, you can keep active TODOs near the top and
completed tasks near the bottom.

If you load your TODO file every time you start up Emacs, then you'll
be sure to check it every day. Put the following line in your ~/.emacs
to have it automatically loaded when you start:

(find-file "~/TODO")

You'll also want to make it easy to open during an Emacs session. If
your TODO file is just a keyboard shortcut away, you'll find it easier
to keep all of your reminders in the file. Here's a snippet that shows
the TODO file in the current window.

See? Emacs is fun and easy to configure. You can store your tasks in a
plain text file and then add keyboard shortcuts to make your tasks
easier to manage.

There are many sophisticated task management packages for Emacs. I'll
write about one of them tomorrow. In the meantime, if you want to find
out what task manager I _really_ like using, you can check out
PlannerMode! =)

12. BBDB tags: 01:52

Right, that thing looks like a good idea. It should be easy to
hack into BBDB. I'll need to actually tag people, and then write an
Emacs Lisp script that scans through all of the records, gathers them
into categories, and then creates the list.

10. Lightning completion and highlight completion: 00:28

A stray mention in #emacs led me to
http://www.math.washington.edu/~palmieri/Emacs/ , which has Emacs Lisp
code for lightning completion and highlight completion. Both are
pretty interesting, and I wonder how I can put them to good use.
Hmmm...

8. Managing my mail: 15:38

I use Gnus, one of the many mail/news clients available for Emacs.
The following features help me manage the volume of mail I get each day.

Mail splitting

Yes, yes, the Gmail way is to keep everything in one folder and then
use searches to filter your messages. Still, I like being able to
glance at my screen and see 2 personal messages and 3 planner-related
messages.

Topics and group hiding

I use Gnus topics to divide my mail into folders and subfolders.
Mail groups are hidden unless they have mail. Some groups like
mail.misc and mail.planner are generally useful, so I keep them visible
even if they don't have unread mail.

Scoring

Gnus allows you to automatically score threads and messages up and
down based on various criteria. You can set it to completely hide
boring messages, show them in a different color, show interesting
messages in a different color, etc.

On most mailing lists and newsgroups, I don't bother reading message
bodies. I just scan through subjects, hitting k to kill entire threads
I don't find interesting. Gnus remembers what threads I've killed,
marks them as read, and scores them down automatically. It also scores
up messages containing certain keywords, replies to my posts, and
threads I found interesting.

Integration with my contacts

I put interesting people in my BBDB contact database. Gnus indicates
messages from them with a little + beside their name in the message
summary. If someone I know is interested in a thread, I might find it
interesting as well.

Hiding and article washing

I've set Gnus up to hide quoted text. This makes browsing through
threads much easier because I can concentrate only on the the new
parts. I can hit a few keys to expose sections of the quoted text if
the replies aren't immediately obvious from the context.

I can also set it up to remove ads at the bottom of messages,
particularly long signatures, To: lines with more than N recipients,
that sort of thing. I can tell it to strip out HTML, too.

Displaying parent article

Sometimes I'll jump into the middle of a thread. I can use ^ to get to
the parent message.

Searching

I use swish++ to index and search through my personal and
planner-related mail.

Planner hyperlinks

Most of my tasks come in through e-mail. Planner lets me keep track of
my TODOs easily by automatically hyperlinking to the mail message I'm
looking at when I create a task. Dealing with a few items on my TODO
list is much easier than going through a large inbox! =)

5. highlight-tail-mode: 09:24

I just ran across highlight-tail.el
from gnu.emacs.sources. It leaves a colored trail behind your inserts,
fading over time. Completely useless (although it does give you a
visual sign of how much you've been typing) but altogether cute. Why
we have stuff like this, I don't know--but it's cool anyway!

4. More Emacs evangelization: flashcard: 15:43

Aris and I are both struggling with far too much kanji. I used a
combination of kdrill to gain familiarity with kanji and
../emacs/flashcard.el to drill the meaning into my brain, as
flashcard.el requires me to get a question right 5 times in a row
before considering it solved. Aris searched the Internet for flashcard
programs on Windows and played around with things like Kanji Gold and
King Kanji, but couldn't figure out how to import our wordlist into
them. Kanji Gold looked promising as it also used EDICT, but I
couldn't figure out the magic number at the end of the dictionary
entry. With over 200 words in our word list, there was no way we were
going to enter those things one by one!

I told him to download Emacs and grab Jorgen Schaefer's flashcard.el
from my ../emacs directory. I then grabbed the dictionary file that
Kanji Gold couldn't recognized, replaced [ with : to get flashcard to
recognize it without problems, then set up a deck for him. I tweaked
the default faces a bit--they're horrible on light-colored displays. I
copied the suggested feedback config and explained the pigeonhole
method to him. I tweaked the checking function so that it checked for
substrings and treated empty input as a definitely incorrect answer.
He wanted the answers displayed all the time, so I coded that in as
well.

The initial word list was too big, so I copied 9 words and put them
into a file, then imported them into a deck. Later, when he finishes
this deck, I'll show him how to create another colon file and import it.
I'll also ask him if he wants to tweak the number of compartments.

He's asked me if I can get YM working in the text editor as well. I'm
currently tunneled through Richi's host, but I think I can open a
local tunnel for him as well, if he feels like using ERC. 'course,
normal YM just might work, and chances are there's a YM-specific
client somewhere in Emacs.

I've made no efforts to hide Emacs' complexity. I lean over and drop
into Lisp code in front of him because I want him to have a working
environment up and running as soon as possible. Who knows? Maybe he'll
use Emacs even after the internship. =)

He looks like he's having fun, and certainly appreciates the fact that
I can hack the editor to fit how he wants to do things. He wants to
match the readings, too, which means I'll need to figure out how leim
works under Windows. I'll do that on Monday.

I used xtla to browse my TLA archives today. xtla's bookmarks and
missing patch summary made merging missing patches much easier. I used
m to mark interesting patches and . r to replay
the marked patches. Great stuff.

In related news, I'll really need to migrate the archive. At 98414
characters, our ChangeLog is now 1/5 of the size of the source code
(457478 bytes). Dev's changelog is much bigger--147672 bytes.

I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at [email protected] .

Page: emacs

Updated: 2005-07-1011:35:5911:35:59-0400

NOTE: ANTI-SPAM MEASURE NOW IN PLACE. Please answer the following question with the right number in order to send me your comment.