diff options
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -346,6 +346,23 @@ at a time instead, which is sometimes useful when perusing IRC logs. (bind-key "<prior>" #'scroll-down-line) #+END_SRC +Convenience function for inserting an ISO 8601 timestamp or copying it to the +kill ring. + +#+BEGIN_SRC elisp +(defun insert-isodate (arg) + "Insert the current time as an ISO 8601 timestamp. If ARG is +non-nil, do not insert the timestamp, but push it to the +beginning of the kill ring." + (interactive "P") + (let ((timestamp (format-time-string "%Y-%m-%dT%H:%M:%S%z"))) + (if arg + (kill-new timestamp) + (insert timestamp)))) + +(bind-key "C-x M-d" #'insert-isodate) +#+END_SRC + ** Ivy As [[https://icosahedron.website/@zge/101330910258980695][suggested by a friend]], I tried out Ivy as a replacement for ido. It was love |