grep one result per file

I use find-grep daily to find a “today in previous journals” (which is one of the only true services Facebook provides, for those who don’t value their privacy). Those entries then go into each day of my daily journal. The trouble is, after you do this for a few years, a big chunk of your daily matches are those same matches from yester-year. I organize my journals by year, so really I just want the first entry that matches a day for each year, and I don’t need the sub-entries.

Firefox address in titles for exwm

Using bufler1 and selectrum2 to navigate browser buffers concisely. Firefox plugin Because one of exwm greatest benefits is using emacs’ in-built buffer methods for navigation, it is handy to include the address of any website in its title so the buffer can be found by just searching, e.g., “slack”. For this reason the misleadingly named “KeePass Helper"3 is tremendously useful. Now I can easily select my buffers with a random-access method off a portion of the URL.

selected for brilliant emacs selections

I just discovered1 selected.el2 and am impressed: it is a perfect example of a simple idea that is enormously powerful. This is the kind of idea that leaves you wondering, “why haven’t I thought of that before?” Part of the simplicity is that you define all your own keys for your own usage. Below is my invocation so far, for things I use often. I’m also trying out the move-text3 script, though it isn’t part of my workflow yet.

how to include instructions within the enumerate in orgmode latex export?

Orgmode exported to latex automatically renders lists into enumerate blocks. The trick was to insert some parameters WITHIN that enumerate block to tweak a particular list output. The answer1 turned out to lie in the #+ATTR_LATEX: command, as follows: Orgmode In #+ATTR_LATEX: :options \setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} 1. first 2. second 3. third Latex Out \begin{enumerate} \setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} \item first \item second \item third \end{enumerate} Footnotes 1 StackExchange for this question, including the answer from NickD: https://emacs.

How to most accurately update my Window numbers?

I use EXWM and three monitors, so knowing my window numbers is crucial to my navigation. I used to use Ace Window to present a red digit at the corner of emacs screens with which number to press to get there. The two problems with this are that you can’t know your numbers until you invoke Ace Windows, and more damningly, you can’t get these numbers on exwm (non-emacs) windows, such as my ever-present browsers.

Best Emacs interfaces

Part of the power of emacs is the navigation and paradigm: cursors zipping around, sophisticated kill-ring and undo support, interactive searching, frames and windows, etc. And all of this within a keyboard-driven interface. So when done right there are some exceptional wrappers/interfaces. Let’s focus on things that are actually just an emacs interface over facilitiers provided by other programs/apis – not just emacs replacements. Below are some superb examples that I find superb:

Re-Writing an OpenConnect VPN Connect script in Babashka

This is the second of a 2-part series of articles.1 It was updated 2021.005.24 to add the :servercert option to the openconnect command. The sundries of just handling arguments and options2 was alone so annoying in Bash that I finally used it as an excuse to play with Babashka3, which I’ve been watching eagerly for quite a while. The script itself is small while providing niceties that would have taken much longer, and also more lines of code, to implement in Bash.

Writing an OpenConnect VPN Connect script in Bash

Bypassing proprietary GUI for VPN connection was a very productive idea, and using OpenConnect to replace the Cisco AnyConnect client which was continually breaking for me proved nice, and provided a nice1 command-line interface to make it scriptable. This is part of a series2 of articles because making something even as trivial as an API wrapper in Bash, gave me a mortifying glimpse of the antiquity of Bash. So after this article, check out the re-work in Babashka, a fast and much better designed interpreter that works as a shell script.

Best features for text-editing in emacs

There has been recent discussion about emacs for text editing and it got me thinking; I use emacs for a lot of non-code text editing and here are some features I use all the time that lead me to consider emacs good at text-editing. I’ll separate them into built-in and external library categories. What would you add to this list for things that help with raw text-editing (not IDE-like programming features)?

use different java version on your system

Some of my Clojure deployments are using our old deployment method, which uses immutant, but it’s deprecated and fails due to an old dependency requiring java 8-. So switch to java 18 like (assuming it’s installed) like this: sudo update-alternatives --config java Resources