From 70f5a617637e4a51193e8a58d88775a482435b24 Mon Sep 17 00:00:00 2001 From: larstvei Date: Thu, 4 Jul 2024 17:58:04 +0200 Subject: [PATCH] today's date --- init.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.org b/init.org index 4c7d256..e249710 100644 --- a/init.org +++ b/init.org @@ -1473,6 +1473,14 @@ (fill-paragraph nil (region-active-p)))) #+end_src + I don't enjoy writing out today's date, so let's tuck that into a function. + + #+begin_src emacs-lisp + (defun insert-todays-date () + (interactive) + (insert (format-time-string "%Y-%m-%d"))) + #+end_src + * Advice An advice can be given to a function to make it behave differently. This @@ -2089,6 +2097,7 @@ ("C-c j" . cycle-spacing-delete-newlines) ("C-c d" . duplicate-thing) ("" . tidy) + ("C-c t" . insert-todays-date) ("C-c q" . unfill-paragraph)) :config (define-key custom-bindings-map (kbd "C-c .") (cycle-themes)))