tips

A tip to recover blank screens with EXWM

Intro Sometimes in EXWM when I switch machines to and plug in my dock to an already running system, one or two of my external monitors stay black1. Sometimes this also occurs when my smart-dock2 changes power levels to the dock. It has enough throughput to utilize my whole 100w power inlet, but its “smarts” mean that when I connect my USBC phone, for instance, the amount of power going out changes dramatically and the shift can “lose” my two HDMI monitors until I do the trick below.

Tip: BBDB mode for contact management

BBDB1 is one of those libraries that has been around for so long it would be highly irregular if we weren’t talking about Emacs. The size and age of the thing is what originally scared me away from it in favor of org-contacts2, which had the advantage of being orgmode but was deprecated a long time ago. With BBDB you don’t usually view the elisp database that lies beneath, instead using its robust interface to interact.

Anzu mode for incremental find-and-replace

Shared on the Emacs Tip & Tricks thread 1. Anzu is great for previewing your query-replace as you go; just remember not to attempt it on HUGE files as the preview (or at least, result counting) gets problematic. Also remember that if you are doing a regexp replace that has side-effects (e.g. incrementing a counter), the preview itself will also do all those side effects before you run the actual replace.

Tip: shortcut for kill-this-buffer

I have added the following shortcut, possible since exwm frees up my s- key: (exwm-input-set-key (kbd "s-<backspace>") 'kill-this-buffer) And, for when I am already in an emacs buffer, this added to my personal key map: (define-key map (kbd "s-<backspace>") 'kill-this-buffer) In any case, making a single-chord shortcut for kill-this-buffer has highlighted how often I use the command, and made work that much faster. Highly recommended!