Interesting bits elsewhere:
- Whither Tartaria? - Scott Alexander
- A New Medium for Communicating Research on Programming Languages
- The Universe of Discourse : Simplest example of Simpson's paradox
- xkcd: Real Programmers
Over the years, i've written perhaps hundreds of little emacs commands. Most of them looked useful at the time (why, i absolutely needed them!), but just faded away after a few weeks. There are a handful though that i use all the time, and i specially like it when their signal (features, usefulness) to noise (lines of code) ratio is above average. Here's one with a surprisingly high one:
(defun jao-buffer-same-mode (&rest modes) "Pop to a buffer with a mode among MODES, or the current one if not given." (interactive) (let* ((modes (or modes (list major-mode))) (pred (lambda (b) (let ((b (get-buffer (if (consp b) (car b) b)))) (member (buffer-local-value 'major-mode b) modes))))) (pop-to-buffer (read-buffer "Buffer: " nil t pred))))
A gem introduced in emacs 23 that i've overlooked all these years:
In the last couple of months, i've been moving from Gnus (after more than twenty years using it!) to notmuch, as part of a simplification journey (simpler code means a more hackable (emacs) environment) and also because tagging finally clicked-in (but don't believe anyone telling you that notmuch is only about tagging, it allows search and folder-based workflows just as nicely). Naturally, i've found several things i liked in Gnus's interface missing in notmuch's, but the simplicity of the latter has made possible implementing most of them, sometimes with remarkably little code. One of them is thread folding.more ...
Reading mailing lists via Gnus by pointing it to the usenet service news.gmane.io is a well-known trick among emacsers. It has a couple of drawbacks, though: network latency and no search. The two problems have, as almost always with almost any problem in Emacs land, a cure. The names of the game are, in this case, leafnode and notmuch.more ...
From a recent checkout of the Emacs source code:
;;; desktop.el --- save partial status of Emacs when killed -*- lexical-binding: t -*- ;; Copyright (C) 1993-1995, 1997, 2000-2021 Free Software Foundation, ;; Inc. ;; Author: Morten Welinder <firstname.lastname@example.org> ;; Keywords: convenience ;; Favorite-brand-of-beer: None, I hate beer. ;; This file is part of GNU Emacs.
Mine is Guinness :)
This package provides notmuch queries in emacs using consult. It offers interactive functions to launch search processes using the notmuch executable and present their results in a completion minibuffer and, after selection of a candidate, single message and tree views.more ...
i've been using Bastian Bechtold's org-static-blog for this blog for more than a year now. Back in the day, i mentioned how well it integrated with my emacs workflow and how its simplicity was a big asset1.more ...
I use Dmitry Gutov's diff-hl to highlight (with fringe marks) modified
hunks in my files under git revision control. The package comes with
diff-hl-next-hunk, that one can use to navigate them. So,
taking a peek at
consult-lines, it was straightforward to put together
a consult function to navigate, with completion and preview (although
i disable the latter) the hunks in the current file:
After my latest adventures writing a small spotify library and learning in the process a bit more about consult, its author, Daniel Mendler, was kind enough to comment on how i had implemented the asynchronous search using consult's API, showing me better ways.more ...
i've found these last days a handful of really useful little emacs packages:more ...
A couple of days ago, i was writing about embark and my first experiment defining a new embarking to play remote video streams. Omar Antolín Camarena, embark's author, has been kind enough to not only read it, but comment on a couple of significant improvements that i think well deserve this follow-up.more ...
Inspired by Prot's musings on completion, i've, ahem, embarked in a reconsideration of my completions setup (as you might have intuited from my recent experiments with the spotify API and consult). As it happens, i'm starting to feel quite at home with a combination of selectrum, prescient and consult, and the ideas to augment what i have with contextual actions using embark seem really natural to me.more ...
I've just published GNU MDK 1.3.0, its 28th release, which finally migrates MDK's graphical user interface to GTK+ 3, to keep up with the, ahem, not-so-modern times and see to it that MDK keeps alive for at least another decade or two.more ...
i've been maintaining xmobar for more than a decade now, and i still use it daily and tweak it almost as often. With almost a hundred contributors besides myself, and many bugs to solve, i am always learning new things. The latest one, that font awesome thing everyone seems so fond of.more ...
i don't dislike emacs' mode line, i just wish (possibly out of a fetish for simplicity and minimalistic user interfaces) sometimes it wasn't there.more ...
For years, i've been using
C-x o and
C-c <n> to move to other
windows, but with ace window i am substituting all of them with
Problem is, muscle memory interferes and i find myself clumsily moving
around (and often lost) with the former ones. Or i did, before i
followed an advice from Stefan Monnier in emacs-devel: unbind those
keys you want to forget, and you'll get an error when you relapse.
As i've mentioned in a previous post, i organise my emacs sessions in
workspaces, a.k.a. frames, a.k.a. a thematic tiling of windows. It is
therefore important to have quick ways of jumping from a window to
another. Until very recently, i used a home-cooked collection of
C-c 2 …
C-c n) that would move my point to the nth
window in the workspace (i trained myself to count them quick enough,
i suppose), and used that together with the stock
C-x o and with
(other-window -1), for something similar to "previous
window", to move around. But i've discovered a better way.
i typically organize my computing sessions around workspaces, which in emacs are simply glorified default window configurations, sometimes in a one-to-one relationship with emacs frames1. That's specially natural if you use exwm, where there's a concept of workspace essentially equivalent to emacs frame. So here too i'll have a "coding" workspace with programming buffers, a "browsing" one inhabited by emacs-w3m buffers in a two-pane layout, an "X" for the few non-emacs applications i use, and one devoted to "email/calendar/agenda", where Gnus plays a central role.more ...
i've been learning a tiny bit about web security at mozilla's Web Security pages, and used their Mozilla Observatory to analyize this site and make it a bit safer. it was just a matter of adding a handful of headers to the webserver configuration, to wit:
Emacs being, essentially, my operating system and window manager, i've had since i remember a set of keybinding maps grouped by functionality (sleep and related operations, media player control, network access, and so on), whereby every group of commands starts with the same prefix. E.g., all my commands controlling media have a keybinding starting with `C-c m`. Nothing earthshaking, and pretty common. Recently, the transient library has made my life easier in this department.more ...
Posted to comp.lang.scheme on January 17, 1996, for Scheme's twentieth birthday.