Posts

Excellent thread: java vs c# for developer productivity

A classic thread that gives a mature and responsible consideration of such things as ecosystem and tooling. In particular appreciate Mikera’s answer respecting Java’s extensibility as the more open of the two, which has led to things like Groovy, Scala, and Clojure (though Clojure also has a CLR version, it’s being hosted on the JVM is one of its super-powers). https://softwareengineering.stackexchange.com/questions/51887/java-vs-c-productivity-perspective

Easy incrementing find and replace in emacs

I start with a list with a bunch of entries like this: newsletter W02 newsletter W02 newsletter W02 newsletter W02 EDIT: New Solutions It turns out that emacs automatically initializes a variable that tracks how many interations your replacement function has made, and in lisp mode you can get to it with \#. This way, the single line necessary to number all my newsletters becomes this: W\(02\) → W\,(format "%02d" (+ 4 \#))) and, of course, you can adjust that 4 to whatever you need it to be for your starting digit.

Make GNUs "sent" show recipient, not author

https://www.reddit.com/r/emacs/comments/e66ewg/make_gnus_sent_show_recipient_not_author/ I’m a GNUs user and am pretty happy with it. However, I have a “Sent” message group where the summary line is the same as everywhere else, meaning it includes the author (me!) and not the recipient. How can I change the summary line format in just the outgoing buffers (or, alternatively, if the author is me)? For reference, here’s my current insensitive line-format variable: (setq gnus-summary-line-format "%U%R%([%-30,30f]:%) %-50,40s(%&user-date;)\n") The winning solution?

Resize gif with gifsicle

Turns out resizing animated gifs with imagemagick is clumsy. Gifsicle does it quick and without fuss. Below is my command, taught by askubuntu. gifsicle --resize-width 600 helm-org-clock.gif -o hoc-smaller.gif This resizes my screen-capture gif to a scaled width of 600 and whatever height keeps the proportions, which dropped my size from 160k to 58k.

Emacs can't show light background

Although I’ve long had a habit of frequently changing my themes, even having a key chord set for that, at some point recently I became unable to switch to any light-background theme; it was always some shade of black. This became a real problem since Wikipedia in eww became unreadable for equations. I looked into this and found the answer from Sacha Chua, who pointed me to M-x customize-face default which had somehow had my default background set to some dark dark gray (I’m guessing when I was playing with persp mode).

Gif screencasts from Linux CLI with Byzanz

Wanting to demonstrate the power of emacs M-x butterfly, I needed to make the sort of gif-screen-capture I’ve seen others put to good work. Extra snag: I use emacs itself for a window manager, so the first online recommendation of Peek didn’t work. Instead I found the open-source byzanz to record; however, it requires knowing the screen-portion and length of the gif beforehand. Other than that, though, it worked great even on my exwm (GUI-resistant) system.

movemail: mailbox (file) cannot lock: Conflict with previous locker

I receive an error when something somewhere crashed, and couldn’t get my mail into emacs Gnus with the following error: movemail: mailbox `/var/spool/mail/webdevtory’: cannot lock: Conflict with previous locker (1 return). Continue? (y or n) Continuing was useless (didn’t show my new mail), restarting the whole machine didn’t work. So just go to the directory and delete the .lock file in there. Back to health.

Firefox: Keyword Shortcuts 2019

For years I’ve had shortcuts in Firefox. In this example, I’ve long been able to type i thing in my URL-bar and it would immediately take me to a google image search for “thing”. In the past this was added by right-clicking “search” on some page and selecting “add a shortcut for this search”. At some point, though, that went away. The functionality is now hidden a little, and you solve it with bookmarks (which I also haven’t used in any form for years).

Getmail failure: invalid syntax

getmail -rmymail.conf File “/usr/bin/getmail”, line 64 except ImportError, o: ^ SyntaxError: invalid syntax It turns out, the service I use to collect my email, getmail, requires python 2; I’d forgotten this (if I ever knew it) and made python 3 my system default (I rebound the “python” command to 3 instead of 2) and so it failed. I didn’t realize this until 16 hours later wondering why I wasn’t getting my mail, and digging into my scripts, evaluating line by line, I finally got the above error.

Auto-add BCC address to notmuch/message-mode messages

I use GNUs for most of my email needs, but also have notmuch for rapid search of my inbox. Trouble is, when I choose a message in that notmuch search, it doesn’t open it with gnus but with its own message-mode spinoff called Message[Notmuch]. In GNUS I have an automatically added BCC address (my “sent-mail” inbox, which is downloaded across devices to sync what I’ve sent). How can I get the same automatic BCC added to anything I send in reply with Message[Notmuch]?