diff --git a/README.org b/README.org index 2a89c7e..98dfab8 100644 --- a/README.org +++ b/README.org @@ -1965,17 +1965,25 @@ backward compatibility. See table [[tab:org-latex-class-tag-placeholder]] and ty (insert "\\(\\)") (backward-char 2))) + (defun org-active-current-time-stamp () + "Insert an active date-time stamp of the current time." + (interactive) + (if (fboundp 'org-insert-time-stamp) + (org-insert-time-stamp (current-time) 'with-hm) + (let ((stamp (format-time-string "<%Y-%m-%d %a %H:%M>" (current-time)))) + (insert stamp) + stamp))) + + (defun org-inactive-current-time-stamp () + "Insert an inactive date-time stamp of the current time." + (interactive) + (if (fboundp 'org-insert-time-stamp) + (org-insert-time-stamp (current-time) 'with-hm 'inactive) + (let ((stamp (format-time-string "[%Y-%m-%d %a %H:%M]" (current-time)))) + (insert stamp) + stamp))) + (with-eval-after-load 'org - (defun org-active-current-time-stamp () - "Insert an active date-time stamp of the current time." - (interactive) - (org-insert-time-stamp (current-time) 'with-hm)) - - (defun org-inactive-current-time-stamp () - "Insert an inactive date-time stamp of the current time." - (interactive) - (org-insert-time-stamp (current-time) 'with-hm 'inactive)) - (define-key org-mode-map (kbd "C-c ") #'org-inactive-current-time-stamp) (define-key org-mode-map