Endless Parentheses

Concise ramblings on Emacs productivity.

Support on Gratipay
profile for Malabarba on Stack Exchange

Old Packages and New Packages in 24.4

New in 24.4 post series

Our final post of the series starts with a sober note, but swiftly moves to a happy ending. Just as we cherish each improvement to our favorite packages, so must we honor the dead who served us and give the newborn a chance to thrive. These are the packages marked obsolete, followed by the new packages you didn’t even know you wanted.

Obsolete packages

First, some short comments on the obituary.

longlines.el; use visual-line-mode.

This is sad, but don’t weep yet. I have a feeling a dead will rise from this grave on Emacs 25 (stay tuned).

iswitchb.el; use icomplete-mode.

This news flowed around the Emacsphere some months ago. Between icomplete-mode and ido-mode, iswitchb was no longer necessary.

terminal.el; use term.el instead.

They were redundant, and now they’re identical.

meese.el.

sup-mouse.el.

the old version of todo-mode.el (renamed to otodo-mode.el).

xesam.el (owing to the cancellation of the XESAM project).

yow.el; use fortune.el or cookie1.el instead.

Five packages I’ve never ever ever heard of. But I’m sure somebody will miss them.

New Modes and Packages in Emacs 24.4

Now, the interesting part.

New package eww.el provides a built-in web browser. This requires Emacs to have been compiled with libxml2 support.

I remember a lot of talk on eww’s speed and visual accuracy. It’s not always that I salute a package whose role is already filled by several others, but this one looks promising.

New package nadvice.el offers lighter-weight advice facilities. It is layered as:
add-function and remove-function, which can be used to add/remove code on any function-carrying place, such as process filters or <foo>-function hooks.
advice-add and advice-remove to add/remove a piece of advice on a named function, much like defadvice does.

Perhaps the advice interface needed a light-weight alternative. I never really noticed, and this package (while nice) feels rather underwhelming. Here’s a usage example.

(defvar x 1)
(defun test ()
  "Description"
  (interactive)
  (message "%s" x))

(advice-add 
 'test :around
 (lambda (fun) 
   (let ((x 2))
     (funcall fun))))

New package frameset.el provides a set of operations to save a frameset (the state of all or a subset of the existing frames and windows, somewhat similar to a frame configuration), both in-session and persistently, and restore it at some point in the future.

Now we’re talking! Can you believe Emacs had no way of saving window/frame configurations between sessions? I ran into this problem before, and so did this user at Emacs.SO. Before, all you could do was save it within a single session. Thanks to frameset.el, not only can you save configurations manually, but desktop-save-mode hooks into that automatically!

New package filenotify.el provides an interface for file system notifications. It requires that Emacs be compiled with one of the low-level libraries gfilenotify.c, inotify.c or w32notify.c.

I can imagine some nice uses for this, but we’ll have to see what comes of it. For what it’s worth, auto-revert-mode already makes use of this interface when it’s available, making it much less demanding.

New minor mode superword-mode, which overrides the default word motion commands to treat "symbol_words" as a single word, similar to what subword-mode does.

Bozhidar has more to say on this than I do. I’m a subword-mode worshipper, so I won’t be using this mode.

New minor modes prettify-symbols-mode and global-prettify-symbols-mode display specified symbols as composed characters. E.g., in Emacs Lisp mode, this replaces the string "lambda" with the Greek lambda character.

And we go off with a bang! By default, in emacs-lisp-mode, this will only turn lambda into λ, but that’s enough reason to turn it on.

(global-prettify-symbols-mode 1)

Tags: package, emacs-24.4, emacs

Support on Gratipay
comments powered by Disqus