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-.

Building custom x11 cursors for Linux

I wanted to use the sort of Starcraft game cursors I enjoyed on my windows machine as a teenager, and this was my first thought of custom cursors in Linux. Note that I use EXWM as a low-level window manager, so these instructions should work for most any Linux system. Spoiler: I got it working, but it took a good deal of time that I hope you might be saved. Here is my story.

making Hugo Homepage a post listing

With a recent hugo upgrade on my machine, suddenly all my front-pages were links to my “posts” section and only one click later would you see what had correctly been my homepage previously. I received no help on Reddit or on the themes (which, some of which, unfortunately, are no longer maintained), so did some studying and got it back to working. Here is hoping this helps solve your issue.

Printing from the Command Line (and emacs)

Helpful Resource: https://www.cyberciti.biz/tips/linux-unix-sets-the-page-size-to-size.html Command Note lp print with good defaults lpc status all See printer settings lprm clear print jobs export PRINTER='Sharp-MX-2700N’ Set the target printer before printing lpoptions See available options I generally print PDFs, using the excellent pdf-tools. This provides C-c C-p which will print with the $PRINTER and settings you’ve configured, but sometimes you need more customization.

How to find the highlight face in emacs?

https://www.reddit.com/r/emacs/comments/fcernd/how_to_find_the_highlight_face_in_emacs/ The doom themes I try all have too un-obvious a background color for selected text – the text of future matches when doing an interactive search, or the highlight color of matches while I’m spell-checking, or the mark area when I am highlighting a section of text. I assume these are all the same face, because they look the same. Does anyone know which face this should be so I can customize it, and secondly, can tell me how I could figure out the answer to this question on my own without reading a lot of code?

Image previews with helm-follow-mode

When using helm-find-file you can use helm-follow-mode to cause images to show themselves as you move over them, replacing the need to start up some other program to preview images. The shortcut for that while within helm-find-file is C-c C-f. By default, you will be ejected from the follow mode as soon as you move over a non-image file. The following customizatoin will give it a little more tolerance: (setq helm-follow-input-idle-delay 0.

Emacs Gnus delay (schedule) email sending

I always forget how to schedule my emails and it’s a pain to look up because Gnus uses the word “delay” instead of “schedule”, so here it is. Note that for gnus message scheduling (delaying) to work, you will need a line like this in your init file: (gnus-delay-initialize) In a message buffer with Gnus you can execute C-c C-j (gnus-delay-article) to schedule an item for a later sending. After that I see it scheduled in my nndraft:delayed folder with a “date” line describing the time at which it will be sent.

Extracting pages of pdfs

Using qpdf: qpdf --pages ./decree.pdf 1,11 -- ./fulldecree.pdf sup.pdf The cryptic – is because –pages allows pages to be extracted from multiple pdf sources

Bulk multi-line find and replacement with Dired instead of SED

Scenario: I have a directory full of code files (in this case, 51 of them) that each need a find-and-replace executed; however, it is adding a line to part of the code, so replace one line with several. This means that SED cannot do the trick; you’ll get errors like, > > > sed: -e expression #1, char 49: unterminated `s' command Rather than spending the time figuring out how to encode things for SED, the simplest solution was just to use emacs inimitable dired.

Newsticker failure

https://emacs.stackexchange.com/questions/55125/newsticker-failure-wrong-type-argument-listp/55126 Suddenly newsticker is failing to load. I get the following stack trace on error. I have made no recent upgrades. Debugger entered–Lisp error: (wrong-type-argument listp \.\.\.) newsticker–stat-num-items(Bus\ Driver\ Diaries new immortal) apply(newsticker–stat-num-items Bus\ Driver\ Diaries (new immortal)) newsticker–stat-num-items-for-group(Bus\ Driver\ Diaries new immortal) newsticker–treeview-tree-get-tag(“Bus Driver Diaries” nil “feeds-4”) #f(compiled-function (g) #<bytecode 0x2370c3d>)(“Bus Driver Diaries”) mapcar(#f(compiled-function (g) #<bytecode 0x2370c3d>) (“Sacha Chua” “Good Questions” “Quote of the day” “Tory C Anderson” “Bus Driver Diaries” “Dadacity” “Austen Knows Best” “Every Day Miracles” “Vi Hart” “Brain Pickings” “Inside Clojure” “Reddit Clojure” “Reddit Emacs” “Reddit Postgres” “Reddit Programming Languages”))