Extracting Email Addresses

Mike Zamansky has a late Christmas present for us but, as they say, better late than never. This particular present is another video in his Using Emacs series. In this video he considers the problem of extracting all email address from an Emacs buffer.

The original problem was that Zamansky had several documents, including spreadsheets, that contained email address and he wanted to get a list of all those addresses for further processing. Being an Emacser, his first thought was to extract all the text into an Emacs buffer and work from there.

That extraction amounted to cut and pasting, which, while not particularly satisfying, is probably optimal considering the many types of documents involved and the fact that is was a one-off. Once he has all the text into an Emacs buffer, the rest is relatively easy. Zamansky’s solution was to put together a bit of Elisp to do the job. The value of the video is his walking us through the process of doing that.

One of the things I really like about Zamansky’s videos is that he doesn’t clean them up. You see his mistakes and fat fingering and that helps you understand the process much better than just viewing a polished video of the final result.

Accomplished_Will_31, in a reddit comment, notes that occur can do a lot of this more easily. That’s probably true but the real value of the video is seeing how Zamansky puts together his Elisp solution. His process is applicable to a wide range of problems whether or not occur offers a shorter solution.

The video is 17 minutes, 56 seconds so plan accordingly. Like all of his videos, this one is well worth spending the time on.

This entry was posted in General and tagged . Bookmark the permalink.