Awesome Emacs

If you’re new to Emacs, after you learn the basics, can navigate around in buffers, and deal with finding and saving files you’ll probably start looking for packages that can help streamline your work flow. ELPA makes installing those packages easy but how do you find the ones that suit you?

One answer is the Awesome Emacs project, a community driven effort to curate a list of Emacs packages that people find particularly useful. Each package on the list has a link to some elementary documentation—usually, but not always, a GitHub README file. A testament to the quality of the list is that almost all the packages I have installed are on it. That gives me confidence that I’ll find the others on the list useful too.

You probably won’t want to install them all because many are for specialized environments such as Erlang development. The packages are listed by category so it’s easy to find packages relevant to your needs. Even if you’re an experienced Emacs user, it’s worthwhile taking a look at the list.

Posted in General | Tagged | Leave a comment


Some wisdom from Bozhidar Batsov

Posted in General | Tagged | 2 Comments

Building a Dynamic Menu

John Kitchin, whom I’ve written about many times, has another post up on a nice little utility. He describes how to build a dynamic menu in Emacs that gets rebuilt as things change.

He gives the example of a menu item that lists every file in a directory. As files are added and deleted, the menu adjusts to the directory’s new contents. The menu is recalculated only when it is activated so there’s no need for it to track the directory in real time.

It’s easy to imagine all sorts of situations in which having such a menu might be useful. For example, I could have a menu that let me choose a post from my post queue to publish to Irreal. Kitchin’s code is just the latest of the many interesting things he’s contributed to the Emacs community lately. It’s worthwhile subscribing to his blog to keep up with his output.

Update: Kitchen → Kitchin

Posted in Programming | Tagged | 2 Comments

PGP Problems

I’ve often written about the need to encourage wider use of encrypted emails. As everyone knows, the main problem is that existing email encryption solutions are too hard to use: Aunt Millie simply won’t deal with the complexities. But what are those problems? On the Mac, for example, GPGMail integrates more or less transparently with the Mail App. There are two buttons for choosing signing and/or encrypting an outgoing email—which can be set to perform their functions by default—and incoming encrypted mail is automatically decrypted, perhaps after prompting for a password for the private key. Probably easy enough for even Aunt Millie.

So what are the problems? Matthew Green has a post that offers an answer. The real problem is what it always is with crypto systems: key management. Current email encryption systems, which are mostly all based on the OpenPGP protocol, illustrate this nicely. After you’ve generated a GnuPG/PGP key, how do you communicate it to Aunt Millie? How she can she be sure it’s really your key and not that of her other, conniving, evil nephew? Those are just some of the problems that an email encryption system must deal with. Read Green’s post for exactly what those problems are and some possible solutions.

Posted in General | Tagged | Leave a comment

Map Reduce Explained

If you’re a Lisper, the chances are that you understood the basics of Google’s map-reduce framework before you even read the paper. However, many people without a Lisp background find the ideas difficult to understand. Fortunately, if you fall into this group, Mathieu Blondel has you covered

Posted in General | Tagged | Leave a comment

The Editor of a Lifetime

Recently, I wrote about Sacha Chua’s chat with Harry R. Schwartz and his work with EmacsNYC, which, among other things, releases videos of talks that its members give to the group. The latest video is a talk by Perry Metzger about his 31 years as an Emacs user.

Metzger talks about Emacs’ enduring popularity and why anyone would keep using it for more than 3 decades. There are many answers to that, of course, and Metzger talks about several of them but the main reason is that Emacs excels at the thing programmers, writers, and others whose jobs mainly involve working with text do the most: edit text. He says that a modest effort in becoming proficient in Emacs pays daily dividends in time saved editing text.

The talk is not all cheerleading though. Metzger talks about the shortcomings of Emacs and what we can do to address them. These include better email support, CALDAV and CARDDAV integration, improvements to the extensions language, threads, HTML and PDF display, and others.

Metzger is an interesting guy (I remember reading his blog years ago before he abandoned it) and his talk is well worth watching. The video is 68 minutes so plan accordingly.

Update: There’s an interesting discussion of the talk at the Google+ Emacs Community. Metzger expands on his discussion of Email and Web page rendering, so it’s definitely worth a look if you liked the talk.

Posted in General | Tagged | Leave a comment

Dress Codes

If there are any antediluvian companies out there still insisting that their engineers wear coats and ties or some other sartorial silliness, maybe it’s time to rethink that policy. When you’re holding on to a policy that even the U.S. Government has abandoned, you know it’s time to give it up.

Posted in General | Leave a comment

A Followup on Leaving Gmail

In my post about Chen Bin’s guide to using Gnus with Gmail, I mentioned that in my own quest to move my email operations to Emacs, I was looking at three packages: mew, mu4e, and gnus. In the comments, I got a couple more recommendations. David recommended Wanderlust as a mature and full featured solution. Sam recommended that I look at Notmuch. Both useful additions to my list and I’m glad to have them even though they complicate my decision making.

Sam also provided a link to a post by the invaluable Christopher Wellons that compares Notmuch and mu4e. Wellons’ post is interesting because it’s principally about moving off of Gmail and onto his own server that he would access using an Emacs-based email client. I found this particularly interesting because that’s my end goal: no email middlemen that offer the NSA and others easy access to my email.

If you’re OK with Gmail but would just like to compose messages in Emacs, Artur Malabarba has got you covered with his gmail-message-mode that lets you hot key from your browser to Emacs when you want to compose an email. Malabarba’s got it working with Chrome, Firefox, and Conkeror. He uses Markdown to compose messages but it could probably be patched to use Org-mode fairly easily. In any event if you’re interested in integrating Gmail and Emacs, give Malabarba’s post a look.

Posted in General | Tagged | 9 Comments

Generating an Org Link to a Web Page

Recently, I was rereading Vivek Haldar’s post on the seven levels of Emacs proficiency and suddenly realized that I’d regressed in one aspect of my Emacs skills. Haldar says

Up until now, you probably had one large Emacs window plus many other
shell windows spread out on your screen. Also, if you are a typical
developer, you often had to cut and paste text between those windows.
And that was a major road bump, because you had to use the mouse to
select text in an xterm.

I thought I’d long since stopped committing that sin but my epiphany upon rereading Haldar’s post was that I was still guilty of it in one important case: grabbing links to Web pages. Almost all my blog posts link to at least one Web page and often several. I generated those links in exactly the way that Haldar deprecates: change focus to the Web page, cut the URL from the title bar, switch back to Emacs, paste the URL into the Org link. Clearly, I needed a better method; something that would allow me to grab the URL of the currently displayed browser page and turn it into a link in my Org buffer without leaving Emacs.

The org-mac-link package almost does what I needed but it fills in the link description with the Web page title, which was not what I wanted. So I looked at the org-mac-link code and Kris Jenkins’ excellent video on using AppleScript to play Spotify tracks from Emacs and put together a bit of Elisp that does just what I want:

(defun jcs-get-link (link)
  "Retrieve URL from current Safari page and prompt for description.
Insert an Org link at point."
  (interactive "sLink Description: ")
  (let ((result (shell-command-to-string
                 "osascript -e 'tell application \"Safari\" to return URL of document 1'")))
    (insert (format "[[%s][%s]]" (org-trim result) link))))

Of course, this works only on OS X but that’s OK for me because I write all my blog posts on one of my Macs. Doubtless other operating systems have a way to do the same thing1. You could, for example, find a way of doing this in Python and then call Python instead of AppleScript to retrieve the URL. If your main OS is Linux or Windows and this interests you, leave a comment for others if you find a way of doing it in your environment.



A quick check suggests that org-protocol may be a good place to look but I haven’t researched this in any detail.

Posted in Programming | Tagged , | 5 Comments

Bastien Guerry on Org Mode

Here’s a video by Bastien Guerry in which he talks about Emacs and Org Mode. Guerry, of course, is the maintainer of Org Mode and an interesting guy. Here at Irreal, we’ve mentioned him several times.

Guerry begins by demonstrating naked Emacs, his preferred configuration for how Emacs appears on the screen. Afterwards, he talks a bit about the features of Org Mode and the power it provides. If you’re already an experienced Org user, most of this will be familiar; if you’re a n00b or curious about Org, this video will give you a bit of a taste. The video is just under 27 minutes so plan accordingly.

Posted in General | Tagged , | Leave a comment