get selected value of a select box in Clojure

option onclick Event not Supported With a recent bug I was reminded that <option /> are not allowed to have onClick events by Google Chrome. This led to some annoying debugging as to why something was working in Firefox but not Chrome on one of our applications. Fortunately, Clojure ships with Google Closure, which provides a straight-forward way of obtaining the selected index, and then getting that from the options of the sel.

bufler closes windows from bufler window on switch

Intro This is an issue that others are experiencing too.1 Just pulled and evalled latest bufler moments ago. Have multiple frames/windows running, eg C-x 2 M-x bufler choose one of the buffers from the list, to move to it See it close one of your other windows. I discovered this when it was eliminating my exwm workspaces upon choosing something, but I found that it is by no means limited to exwm things.

How to have orgmode footnotes per entry?

Problem As laid out on reddit1, I arrange my orgmode notes as single files with lots of entries. This works great for me because emacs is more buffer-oriented than directory-oriented, so all the emacs search commands optimize for single-file approaches (eg search all headlines in my tech/blog file for the keyword of that Linux function I’ve forgotten how to use). The single problem I have is footnotes. From the documentation you have two options: inline or in a file-wide section.

setting up a local version of Wordpress on Tumbleweed in 500 easy steps

Intro For a better development experience I needed to set up Wordpress locally on my Tumbleweed machine, which was somewhat different than the Ubuntu that I brought the site from. It wasn’t really 500 steps, but does have some gotchas and require some time to get right. Prerequisites Have a version of the WordPress site running somewhere on server that you can access. You need a mysqldump of its db and a copy of its complete file structure.

guix pull: error: Git error: the SSL certificate is invalid

Intro I am trying to ease my way into GUIX by starting with just using it as a package manager, but my effort was stalled early. I’m getting: $ guix pull Updating channel ‘nonguix’ from Git repository at ‘https://gitlab.com/nonguix/nonguix'&#x2026; guix pull: error: Git error: the SSL certificate is invalid This is occurring after adding a couple to channels.scm: (cons* (channel (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix") (introduction (make-channel-introduction "897c1a470da759236cc11798f4e0a5f7d4d59fbc" (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) (channel (name 'flat) (url "https://github.

Replacing beacon.el with hl-line-flash

Intro EDIT [2021-09-27 Mon]: decreased hl-line-flash-show-period1 I learned about beacon.el2 in one of Sacha Chua’s videos3 that asted users about their favorite tweaks, and it remained one that I found useful throughout several years with emacs. However, it stopped working somewhere in version 27, with a number of glitches that were eventually recognized in the repo, but no fix was available. Beacon candy Beacon was nice because it didn’t highlight the whole line, but only a gradient extending from your cursor, which would gently fade away (at least, that was the idea).

Fail-fast Transients like Hydra

Problem: exwm choking on Transients with Unbound suffix I have been gradually experimenting with replacing my hydras with Transients1, partly as a proof of concept. I have a show-stopping issue2 when I sometimes end up invoking the Transients from an EXWM window, however. The Transient pops up, but no key I press is then sent to the Transient and I end up trapped in a loop: Transient is expecting a key, which needs to be passed by EXWM, but EXWM can’t pass the right keys because Transient is intercepting them3.

Swapping chords in Dvorak, or Why does emacs keyboard-translate fail with (wrong-type-argument characterp 134217845)

Intro One of the great pieces of advice I received for setting up Dvorak keys was to swap C-x and C-u keys, and the following snippet does just that. ;; Dvorak settings (keyboard-translate ?\C-u ?\C-x) (keyboard-translate ?\C-x ?\C-u) I had hoped that a simple replacement of the the C with M would make that change for Meta, too, since M-x is common and awkward on Dvorak. However, that gave me a type error.

The lost art of page breaks in text documents

Updated: [2021-09-23 Thu] comment from Mark Intro Somewhere back in Emacs’ memory of text esoterica and ideas that don’t seem to have taken off, there is support for ascii page breaks: the idea that within a single text document, “pages” could be represented by special characters. This is before the dawn of word processors or orgmode or PDF files, and this is an idea that might still be useful for some enterprising archeologist.

Clojurescript Reagent Image-Previewing Selector

Intro It took some elbow-grease but I was able to convert online examples1 into a working image selector in Reagent Clojurescript. It isn’t a lot of code, but there were two complications: converting the declarative style of the examples into more functional CLJS (hint: it involves closures), and doing it in a way that will jive with the React life-cycle. CSS code The following styling makes things look okay. This is using Garden2 syntax.