Extending Isearch

Nicolas Petton presents a nice bit of Elisp that extends the isearch functionality. With his code, you can search for the symbol at point or the active region if there is one.

The first of these is easily accomplished using【Ctrl+w】from within isearch but that takes an extra key chord. With Petton’s code you just invoke his isearch-thing function and it searches for the symbol at point unless there is an active region.

If you are a heavy user of isearch and find yourself typing 【Ctrl+s】 and then 【Ctrl+w】 a lot, this may be win for you.

Posted in General | Tagged | 2 Comments

Tramp with Multiple Hops

The Emacs Tramp package is a wonderful thing. With it, you can easily edit files on remote machines in a virtually transparent fashion. Most Emacs users are familiar with Tramp and use it to edit files on machines on the local network or on remote-network machines directly reachable on the Internet. Often times, though, those remote-network machines are not directly reachable.

A typical example occurs when a developer is working from home and needs to access a machine on his work network that is protected by a firewall. Emacs, of course, can also handle this case. The normal way is to set rules for how to reach remote-network hosts in your .emacs or init.el file. The rules are a bit complex but are documented in the Tramp manual. Sometimes, though, you just want a one-off access to some protected host and it’s a pain to temporarily add Tramp configuration rules for it.

Fortunately, David Vázquez has tweeted the answer:

Unless you need to repeatedly access some remote host, this is a much easier method. The tweet tells you just about everything you need to know but you can see the details in the Tramp documentation.

Posted in General | Tagged | 4 Comments

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 | 2 Comments


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