Critique my org elisp

Someday I’ll get around to writing about code quality in elisp, but for now I don’t know it well enough to know idioms and avoid code-smell. Orgmode has a massive code-base and the documentation has a hard-time keeping up, so I asked, How is the following code, aimed at getting the list of header tags and making them into a comma-separated string? org-get-tags didn’t work because I needed to support when the cursor is in the text of an entry, not just on the headline.

Emacs Tip: Registers

The Simple Genius of Emacs Registers It’s been in emacs since the beginning, and is not had in many other editors, yet many people don’t know about it. Registers. The documentation talks about many types, most of which I haven’t tried yet. The three I use the most, however, are: Text in register. Suppose I want a chunk of text but am doing something that will pollute my kill ring, so I can’t just yank (paste) every time.

Julian Date

I have tried several date formats; the only thing for certain is that the USA-variability of month/day/year, day/month/year, etc is a really annoying. Today I discovered Julian dates: forget about the month altogether! https://en.wikipedia.org/wiki/Calendar_date#Day_and_year_only This makes great sense, especially for calculating when my packages are set to arrive! Now if only I could figure out my birthday in it… date "+%Y%j" 2020185

Orgmode LaTeX collaboration

https://www.reddit.com/r/emacs/comments/hkjyj2/orgmode_latex_collaboration/ I’ve used LaTeX for years as my document production system, so that I need not bother with word processors. I write letters, papers, homework, dissertations, and presentations in it. For the past couple years, though, I’ve been shifting all these to org-mode, which I find much simpler for managing my materials and exporting to LaTeX (as well as anything else). However, now I am back to working on academic papers collaboratively.

Keyboard-driven Editing in 2020

Why Keyboard Driven Editing in this age of the mouse? First of all, the mouse is easy – you don’t need to learn anything to point, drag, and click. And for many problem spaces this is ideal: I browse the web with a mouse (usually because my work as a web application engineer requires it), and I wouldn’t dream of attempting keyboard-driven image editing such as with Gimp or InkScape.

Backing up my JDBC Crux: is this it?

If you inspect the JDBC database backing a Crux install, you will find it contains only one table – tx_events. Don’t be alarmed; it seems this really does contain the information that constitutes the document database so pg_dump will do its job. See Crux Zulip Thread

Google stuff breaking: setOnLoadCallback

I just had yet another case of stuff I am responsible to maintain breaking because of Google. My long-standing program has run with the following code: google.setOnLoadCallback(function() { /* ... */ }); This has worked for a decade, but finally it seems to have broken. Fortunately, I already had a suspicion that it was a google thing breaking on me as this has happened before. While I am not part of whatever update list is warning about these upcoming changes, they were at least decent enough to tell me that I need to load() charts first.

Debug Cron

Suddenly Cron wasn’t running my mail script; I verified that the script itself was still working, so than I began the venture into the unknown: how to debug Cron? Serverfault has a good answer. Everything seemed to checkout, and I verified that it was working to write to a tmp file. The file was being written. Finally, by removing the line that smothers output to /dev/null I was able to find the problem: the need for an absolute path name (as evidently the Cron user couldn’t run getmail without a full path).

User chattr to safeguard a file from erroneous updates

On Linux you can make files unalterable to anyone – including system processes. In particulary this helps me when my system keeps deleting my getmail program (which isn’t from a repo) with every system update. Make files immutable Make it immutable, so it cannot be changed or removed (preserving the fix I’ve made for the mistyping in mime subclasses) sudo chattr -V +i /usr/local/bin/getmail This makes it immutable. Check which attribute flags are at work on files See what attribute flags (like “immutable”) attributes:

Adding Custom Transit Handlers to re-frame-http-fx AJAX requests

Setting the Scene Transit is a seamless alternative to JSON (actually an extension of JSON). Why use Transit when JSON is so prevalent? For me, the simple reason was that it allows me to preserve my data types (mine are Clojure, but they are not necessarily such) over the wire. For me in particular this was my time types, and my uuids (which I wanted to standardize so they stop alternating between UUIDs, strings, and keywords, for matching purposes).