Endless Parentheses

Concise ramblings on Emacs productivity.

Restarting the compilation buffer in comint-mode

After last week's post, Clément Pit-Claudel informed us of an alternative method for providing input to compilations. I have no idea how I’d never learned about that before, but I figure that other people might be in the same situation so it’s worth a post. Have a look at the Update at the end of the post. [...]

Provide input to the compilation buffer

The Emacs compile command is a severely underused tool. It allows you to run any build tool under the sun and provides error-highlighting and jump-to-error functionality for dozens of programming languages, but many an Emacser is still in the habit of switching to a terminal in order to run make, lein test, or bundle exec. It does have one limitation, though. The compilation buffer is not a real shell, so if the command being run asks for user input (even a simple y/n confirmation) there’s no way to provide it. [...]

Fill and unfill paragraphs with a single key

fill-paragraph is probably among the most underappreciated Emacs commands. I use it dozens of times a day, and never stop to think of just how awesome and practical it is. Still, we can make it a little bit better. Every once in a while I need to “unfill” (or “unwrap”) a paragraph that’s broken over many lines. [...]

A review of Mickey Petersen’s “Mastering Emacs” book, for beginners and advanced users

I wish I had reviewed this book when it first came out, over one year ago. Alas, those were busier times and this piece of work deserved more than a short post hastily written between seminars and group meetings. Fortunately, Mickey has unknowingly gifted me a second opportunity, by making it half-off for its 1 year anniversary, and you have until tomorrow to grab the discount. [...]

Locally configure or disable show-paren-mode

show-paren-mode is a minor-mode that highlights the bracket at point (be it round, square, or curly) as well as its corresponding open/close counterpart. I find it a must-have for Elisp and Clojure programming. On the other hand, when editing Ruby code, it also highlights whole block delimiters, like def, do, if, and end, and all that must-haviness quickly turns into in-your-faceviness. [...]

validate.el: Schema validation for Emacs-Lisp

Emacs’ customizable variables (a.k.a., defcustom) are allowed to specify a :type parameter for setting its custom-type. The customize interface uses this information to produce a sophisticated menu for the user to customize that variable. However, a large fraction of users use setq to directly edit custom variables, and even some packages programmatically change the value of other package’s custom variables. Ultimately, there are no guarantees that the value in question matches the :type specified in the variable. [...]

Disable Mouse only inside Emacs

As laptop touchpads seem to be steadily increasing in size, one unfortunate consequence is that it becomes increasingly harder to avoid touching them by accident while you type. Most systems have safeguards in place that disable the touchpad as you’re typing, but they always seem to fall short for me when it comes to Emacs. While in Emacs, my hands are permanently resting on the keyboard (and over the touchpad), so even if I stop typing for several seconds I don’t want the touchpad to reactivate. [...]

ANSI-colors in the compilation buffer output

Countless build tools and shell scripts use ANSI escape codes to colorize their output. This provides impressive improvements to readability when running from a terminal that supports them, but tends to cause a catastrophic mess anywhere else. Emacs’ compilation buffer is one such place. It doesn’t support ANSI colors by default, but that’s very easy to fix. [...]

Emacs is available on Chromebook and Chrome

Are you a Chromebook user or thinking of becoming one? Are you a die-hard Emacser who needs to see it run even in your browser for no good reason (no judgement)? Either way, Emacs has you covered. Thanks to the efforts of Pete Williamson (and friends), there is now an Emacs port for Chromebook and Chrome. [...]

Improving Projectile with extra commands

Admittedly, I’m a very late passenger in this boat — only after 4 years of using Emacs did I decide to try a project manager. Nowadays I can’t even remember my daily workflow without Projectile. This package mostly stays out of your way, and provides a series of useful commands for dealing with a project (which are aware of a lot of languages out-of-the-box). As usual, you can find details in the readme, and we’ll jump straight into useful configurations. [...]

Running Emacs on Android

As Android phones rise in power, bluetooth keyboards become cheaper, and your addiction to Emacs grows, it’s only natural that you start thinking of combining the three. Fortunately for you, it’s not as hard as it used to be. In fact, it’s perfectly possible to reproduce (most of) your desktop config, if you know how to get past a few obstacles. [...]

Eval-result-overlays in Emacs-lisp

One of the things I like most in CIDER is how evaluation results are displayed by inline overlays. And yet, for some reason, it’s taken me almost a year to transfer that to Elisp. [...]

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. [...]