summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jakob.org17
1 files changed, 17 insertions, 0 deletions
diff --git a/jakob.org b/jakob.org
index b8637d6..ab244c3 100644
--- a/jakob.org
+++ b/jakob.org
@@ -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

© 2015 - 2026 Jakob L. Kreuze