Danger of diversions in Emacs

Emacs is so delightfully extensible it can easily be a Will-o’-the-wisp in a situations like this morning: Editing my “journal.2020.org” file as I do every day, I decided to finally remove the inconvenience of moving my fingers to the arrow keys to promote/demote structures. First I thought, “I’m just going to add this to my org-mode hydra so that I invoke it with C-c o and then hit [ or ] to change the heading level.

Orgmode System Notifications with Dunst

Most of emacs is miraculously self-documenting but I found a bare-spot: how to customize emacs notifications. In particular, being an exwm user the in-emacs mini-buffer with Dunst, I hope. There’s a dirth of documentation on the appointment variables/functions, although they are emacs-general. In particular, the key to making this whole thing work, appt-disp-window-function, has no help entry in my emacs, but this does it on my Linux: Solution Code (setq appt-display-format 'window) (setq appt-disp-window-function (function tsa/appt-disp-window)) (defun tsa/appt-disp-window (min-to-app new-time msg) (save-window-excursion (shell-command (concat "notify-send \"Orgmode: " msg "\"") nil nil))) Resources Relevant source: https://www.

A Lesson in the Beauty of Data - XML Parsing on the Front End: to CLJS or not to CLJS?

The task came that I need to parse some XML in a front-only app. In a sense, browsers are just big XML (≅ HTML) processors, so embracing the Clojure principle of being a hosted language, it seemed desirable to utilize the built-in power of my browser. This effort turned out to be a rabbit hole, though. Consider the following: A Native Approach (let [s "<title>Tech.ToryAnderson.com</title>" ;; 1 p (js/DOMParser.) ;; 2 doc (.

Colorize chmod strings in dired

How do I colorize the chmod privileges string? I am using dired+ and dired-hacks and have the ability to colorize the FILES based on the chmod string, but I want the string itself to have colors. I had this a little bit ago but somehow it went away. For example, each column in so that the eye can follow the colors down and easily see permission differences within a directory.

Customizing a Font-Face (dired directories)

I sensed I could improve how my directories appeared in dired, instead of just being bold-face. The question was, how to find which face to change to get the desired result? Digging through my customize-faces options was tedious and sometimes misses the tree for the forest unless you know which one you’re looking for. Locating the face at point Enter the beautiful self-documenting nature of Emacs. Put your cursor on the thing you want to change (remember, our whole philosophy emacs inherited from *Nix is that everything is text).

Locating the face at point

Enter the beautiful self-documenting nature of Emacs. Put your cursor on the thing you want to change (remember, our whole philosophy emacs inherited from *Nix is that everything is text). Then do C-u C-x = (what-cursor-position) and you’ll get a buffer telling you more than you wanted to know about the text you’re on top of. For us, we just want to know the faces at hand; give them a search and then you’ll know just which to change in customize-face.

Fine-grained per-method middleware use with Reitit

Fact: I have middleware performing authentication (in this case, my CAS authentication middleware) Need: This middleware should apply to client-facing SPA-rendered views, which are requested via GET. Constraint: This middleware does NOT apply to non-get routes (which are headless so the authentication must be handled differently) Constraint: There exist headless GET routes, too, which should not be CAS authenticated Constraint: Individual routes may have a CAS-authenticated GET response, as well as non-CAS POST, PATCH, and DELETE responses Reitit allowed me to specify middleware on a delightfully granular level to solve this.

Deploying to Clojars with the new tokens

With a recent, well-deserved funding round to the Clojars repository project, the password you log in to the site with is no longer valid as the password with which you publish deployments. See https://github.com/clojars/clojars-web/wiki/Deploy-Tokens and https://clojars.org/tokens . The annoyingly unanswered question is how I adjust my setup to USE the token. So, here it is with Leiningen. Project.clj I have the following in my project.clj, which is the same as I had before switching from my web password to the token:

Deploying to Clojars with the new tokens :clojure: clojars: deployment: token: leinengen: credentials:

With a recent, well-deserved funding round to the Clojars respository project, the password you log in to the site with is no longer valid as the password with which you publish deployments. See https://github.com/clojars/clojars-web/wiki/Deploy-Tokens and https://clojars.org/tokens . The annoyingly unsanswered question is how I adjust my setup to USE the token. So, here it is with Leinengen. Project.clj I have the following in my project.clj, which is the same as I had before switching from my web password to the token:

Missing font for insert-character utf8 characters?

Question When I do insert-char (C-x 8 RET) I get lots of “no character” font displays, as when I seek characters matching “smil”. Can I fix this without rebuilding emacs? Answer Solved by following https://github.com/rolandwalker/unicode-fonts. Just put the .ttf files in my ~/.fonts dir, and where the repo links were broken I was able to download the font from google fonts. Didn’t even have to restart my emacs. Thread https://www.