Endless Parentheses

Concise ramblings on Emacs productivity.

Leave the cursor at start of match after isearch

Have you ever stopped to think about why isearch leaves point at the end of the match? It does make some intuitive sense to leave you after the characters you have just typed, but that doesn’t make it the most practical behaviour. [...]

A small improvement to clj-refactor

I’ve said before that clj-refactor is a magical package, and you wouldn’t catch me bad-mouthing it in a million release cycles, but it’s impossible to please everybody. [...]

Conditional breakpoints in the CIDER Debugger

CIDER 0.11.0 has been out for less than week and already the snapshots are getting new features. This one comes from a gentleman called Chris Perkins. It provides an easy way to automatically skip some breakpoints during evaluation, and it even comes with 300 brand new lines of tests. [...]

Commands to thread and unwind code in Emacs-Lisp

As you may remember, one of the commands I like the most from the clj-refactor package are the ones that thread and unwind Clojure code forms for you. Now that Emacs is also getting built-in threading macros, I figured the best way to give them a fair chance in life is to also make them pretty convenient to use. [...]

New in Emacs 25.1: More flow control macros

One of my personal favorite new additions to Emacs 25 is, in fact, completely invisible to most users. The new macros if-let and when-let, although simple in purpose, are a delight to use and are frequently finding their way into my code. The other two additions, thread-first and thread-last, are a bit more specific, and take a bit getting-used-to if you’ve never seen them before. [...]

New in Emacs 25.1: map.el library

Another library by the productive Nicolas Petton. map.el is a cousin to seq.el (remember?), but instead of manipulating plain sequences, it manipulates map-like collections (also known as dictionaries). [...]

New in Emacs 25.1: EWW improvements

In the upcoming version, EWW is getting a number of small improvements. This web browser, written by Lars Ingebrigtsen, is something of a new kid on the block, as it just came to life at the very end of the Emacs 24 cycle. Although it’s hard, if not impossible, to reliably render HTML inside an editor that’s 100% line-based, EWW tends to find a reasonable compromise and deserves at least a short post to cherish new features. [...]

New in Emacs 25.1: Easily search for non-ASCII characters

Since last week’s post was about Unicode characters, it makes sense to continue that trend today. This feature might go unnoticed by a lot of people who live in an ASCII world, but it will probably jump out at everyone else at one point or another. The name, if a bit odd, is “character-folding search”. [...]

New in Emacs 25.1: Round quotes in Help buffers

Don’t be fooled by the apparent simplicity of this feature. Its implementation has been the most controversial addition to the upcoming Emacs release — to a comical degree. This post, however, is not about arguments or implementation, it’s about Emacs 25. And this little nugget is all set for the next release. [...]

Quickly search for occurrences of the symbol at point

Isearch is one of Emacs’ most useful (and probably most used) features. Getting in the habit of quickly hitting C-s followed by 2–4 letters will forever change the way you navigate buffers, and adding it to your repertoire is a tremendous productivity improvement. What, then, could we possibly improve on such a phenomenal command? [...]

An improvement to Emacs auto-correct

My Emacs auto-correct is one of the oldest posts on this blog, and I still see it pop up here and there on occasion. Last week, Norman Ramsey asked about an improvement to that command and I figured it’s worth an update post. [...]

Define context-aware keys in Emacs

What do you do if you want to override a key only in a certain context? Take this Quotation Marks post as an example. We want to change the " key in general, but retain the regular behaviour if we’re inside a code-block. In this case the solution was to just call the old behaviour manually, but what if you’re writing a more general command and you don’t know what this “old behaviour” is? [...]

New in Emacs 25.1: Have prettify-symbols-mode reveal the symbol at point

I’ve written before about what prettify-symbols-mode can do for your buffers, ranging from pure eye-candy to signficant readability improvements. Simply put, this minor-mode “disguises” some strings in your buffer to look like something else. For instance, in emacs-lisp-mode it makes lambda be displayed as λ, and (for the next release) it’ll apply to a wide range of symbols in (la)tex-mode too. [...]

Faster pop-to-mark command

Today’s tip is one I learned from Magnar. A lot of Emacsers don’t know this, but most commands that move point large distances (like isearch or end-of-buffer) push the old position to the mark-ring. The advantage is that you can easily jump back through this history of positions by hitting C-u C-SPC. [...]

Improving Emacs file-name completion

Although there’s a surprising number of packages offering alternative minibuffer selection systems, the default minibuffer completion in Emacs is nothing to be scoffed at. Hitting Tab in the minibuffer gives you a slightly beefed up version of the bash completion, and after all these years that is still my preferred method for completing file-names (though I do have some custom-written alternatives). [...]