macros

How to use-package :custom with a variable in an alist?

Intro What I’m trying to do should be obvious from this code: (use-package undo-tree :custom (undo-tree-history-directory-alist '(("." . (concat user-emacs-directory "Undo"))))) But I had trouble getting the syntax right, since use-package is already performing some types of quoting at certain levels. Solution the key was in the proper locations of the syntax-quoote ` and splice , operators. The syntax quote was easy; just swap the reqular quote for it. The splicing operator appears in the location of minimal change, just before the function call that is going to use produce code based on an external variable.

macro power: removing weekends from repeating event

Updated: [2021-12-09 Thu] comment clarifying “macros” Intro Time to make a new daily event for the next 90 days, but it shouldn’t have weekends. Most of these steps become muscle memory after getting used to emacs macro power in orgmode files, sql dumps, dired find-and-replace, text formatting, YAML/XML/HTML/JSON/EDN tailoring, etc. It’s the speed and flexibility of this method that shines, allowing for solutions to very specific problems, or just nice custom orgmode agenda entries in this case.

A Gotcha: test.core/thrown?

https://clojureverse.org/t/a-gotcha-test-core-thrown/5595/1 Clojure is generally such a pristine and sensible language, it took me some debugging time to find out why this was failing: (is (let [proctorless-rmap {:tester (:id tester) :test (:id this-test)}] (thrown? Exception (xreg/register-for-exam proctorless-rmap)) "no proctor should fail")) ;; Unable to resolve symbol: thrown? in this context Trying to solve this at the repl, I was stumped for quite a while by why I couldn’t locate the thrown? function with C-c C-.