format

zero-padding and truncating with string formats in Clojurescript

One of the discrepancies between Clojure and Clojurescript is that the javascript version doesn’t have anything like the classic Unix/C-style string format functions. Some functionality is not simply reproducible with clever uses of str, but fortunately Google Closure is here to save the day. Because Closure is part of Clojurescript, there are no added project dependencies to make this work. (ns myapp.services (:require [goog.string :as gstring] [goog.string.format])) (str "$" (gstring/format "%.

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

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?