The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Add two new Org functions

They help me insert timestamps, which can sometimes be tedious.
Gergely Polonkai 2 years ago
parent a2164f7972
commit 4497b54fb0
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
  1. 25

@ -1090,6 +1090,31 @@ PRIORITY may be one of the characters ?A, ?B, or ?C."
(org-agenda arg "c"))
*** Insert the current timestamp
#+begin_src emacs-lisp
(defun gpolonkai/org-insert-current-timestamp (&optional arg)
"Insert the current timestamp"
(interactive "P")
(org-time-stamp '(16) arg))
*** Insert a heading with CREATED set to the current time
This emulates how Orgzly work with my current settings.
#+begin_src emacs-lisp
(defun gpolonkai/org-insert-heading-created (&optional arg)
(interactive "p")
(let* ((org-insert-heading-respect-content t)
(format-string (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) "]"))
(timestamp (format-time-string format-string (current-time))))
(if (> arg 1)
(org-insert-subheading '(4))
(org-set-property "CREATED" timestamp)))
* UI preferences
** Tweak window chrome