programming (and other) musings
30 Jul 2024

eww to org

Here's a quick'n'dirty command to generate an org-mode rendering of an eww page, taking into account not only links (as the built-in org-eww-copy-for-org-mode does), but also headings, italic and bold faces.

more ...
Tags: emacs
24 Mar 2024

wittgenstein's mistress

wittgenstein-mistress.jpg
more ...
Tags: books
24 Mar 2024

la casa verde

la-casa-verde.jpg
more ...
Tags: books
11 Oct 2023

poor things

poor-things.jpg
more ...
Tags: books
11 Oct 2023

in no particular order

Interesting bits elsewhere:

Older entries

Tags: sundry
30 Oct 2022

the cambridge centenary ulysess

ulysses.jpg
more ...
Tags: books
30 Oct 2022

visual differential geometry and forms

visual-differential-geometry.jpg
more ...
Tags: books
04 Aug 2022

inline snippets and grouping in consult-recoll

I've just released a new version of consult-recoll, which implements a couple of features that i am really liking, namely, grouping of search results by mime type:

consult-recoll-group.png

and inline snippets:

consult-recoll-inline.png

Happy searches!

Tags: emacs programming
31 Jul 2022

parisian lives

parisian-lives.jpg
more ...
Tags: books
22 Jul 2022

consult recoll with live preview

Lately, i've gravitated towards recoll as a unified search engine for all my local data, including org and text notes, documents in PDF or similar formats, HTML files, and local email. As a result, my little consult-recoll package has gone up a few notches up in my list. i've just released version 0.5, featuring live previews.

consult-recoll-preview.png
more ...
Tags: emacs
10 Jul 2022

the last straw: xmobar at codeberg

I've been thinking of moving xmobar's repository and issue tracker out from Github for a long time, for many reasons; but i had been procrastinating on it for the exact same amount of time. Until just now. The codepilot attack has finally broken the proverbial camel back, for reasons better explained in the Give up campaign site from the Software Freedom Conservancy.

There are some inconveniences associated with the move, like not being able to fully participate in issue discussion threads by email, or setting up CI tests, but i'm confident they'll be fixed in time, and, at any rate, the ultimate goal is worth putting up with them for as long as it takes.

So, please follow us to the new xmobar home over at Codeberg!

Tags: programming
19 Jun 2022

klara and the sun

klara-and-the-sun.jpg
more ...
Tags: books
19 Jun 2022

simple note taking

I was just watching Prot's explanation of his new package denote, a very elegant note-taking system with a stress on simplicity and, as the author puts it, low-tech requirements. Now, those are excellent qualities in my book, and i think i'd quickly become a denote user if it weren't for the fact that i already have a homegrown set of utilities following a similar philosophy. Inevitably, they differ in some details, as is to be expected from software that has grown with me, as Prot's with him, during more than a decade, but they are similar in important ways.

I've had in mind writing a brief note on my notes utilities for a while, so i guess this is a good time for it: i can, after showing you mine, point you to a polished package following a similar philosophy and sidestep any temptation of doing anything similar with my little functions :)

consult-recoll.png
more ...
Tags: emacs
08 Jun 2022

slimmer emacs with kitty

A problem of using Emacs as my operating system is that any otherwise minor friction with its interface quickly becomes an irritant, and i thus find myself needed a truly smooth emacs-human interaction; or, to be more precise emacs-jao interaction: my must needs are going to be, sometimes, triffles to you, and the other way round.

During the last year, a perceived sluggishness in Emacs's X11 display performance, together with a very noticeably increased RAM consumption have become one of those irritants, and i decided that enough is enough, and moved (for the time being at least) from exwm to, essentially, using xmonad and kitty as my Emacs's display engine.

emacs-kitty.png
more ...
Tags: emacs
29 May 2022

el infinito en un junco

el-infinito-en-un-junco.jpg
more ...
Tags: books
16 Apr 2022

let's talk lisp

I just got a second-hand copy of this classic. Sometimes, used books are more charming than new ones:

lets-talk-lisp-0.jpg lets-talk-lisp-1.jpg
Tags: books programming
09 Nov 2021

relaying mail to multiple smarthosts with opensmtpd

I like to use a local smtp daemon for sending email from my laptop, because that way i can send emails even while disconnected and, even when the network is up, because i don't have to wait for the network protocol to be completed with a remote smarthost. Oh, and i also need local mail delivery.

For many years i've used postfix to those ends; it has an acceptably simply-ish configuration; but recently i've become fond of VPNs (mullvad, if you want to know), and was annoyed by its getting confused when /etc/resolv.conf changes (for instance, because you get the VPN up after postfix's service has started). I've found a pleasantly simple alternative: OpenSMTPD.

more ...
Tags: sundry
08 Sep 2021

a high signal to noise emacs command

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))))
Tags: emacs
04 Sep 2021

apropos library

A gem introduced in emacs 23 that i've overlooked all these years:

M-x apropos-library
Tags: emacs
19 Aug 2021

notmuch threads folding in emacs

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 ...
Tags: emacs
17 May 2021

fun with dependent types

the-little-typer.jpg
more ...
Tags: books programming emacs
17 May 2021

reading and searching gmane with gnus, fast

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 ...
Tags: emacs
05 Apr 2021

reading source code is fun

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 <terra@diku.dk>
;; Keywords: convenience
;; Favorite-brand-of-beer: None, I hate beer.

;; This file is part of GNU Emacs.

Mine is Guinness :)

Tags: emacs programming
11 Mar 2021

notmuch queries via consult

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 ...
Tags: emacs
26 Feb 2021

simplicity pays off

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 ...
Tags: emacs
01 Feb 2021

consulting hunks

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 a command, 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:

more ...
Tags: emacs
21 Jan 2021

consulting spotify in a better way

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 ...
Tags: emacs
21 Jan 2021

an emacs packages hat trick

i've found these last days a handful of really useful little emacs packages:

more ...
Tags: emacs
11 Jan 2021

an even better video wharf

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 ...
Tags: emacs
09 Jan 2021

embarking videos

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 ...
Tags: emacs
Other posts
Creative Commons License
jao.io by jao is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.