um-date-format

This commit is contained in:
bth 2025-03-07 23:27:11 -08:00
commit 56ca4c6ad4

View file

@ -40,14 +40,12 @@
(defvar um-journal-path-glob ".*/writing/journal" (defvar um-journal-path-glob ".*/writing/journal"
"Primary path glob for the journal. This allows various mountpoints.") "Primary path glob for the journal. This allows various mountpoints.")
(defvar um-date-format "%Y-%m-%d"
"Format passed to `format-time-string' when creating `um-journal-header'. Defaults to ISO8601.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; journal header ;; journal header
(defun um-iso-8601 ()
"Insert a date stamp in ISO 8601 order, but with periods in place of dashes."
(format-time-string "%Y.%m.%d")
)
;;;###autoload ;;;###autoload
(defun um-journal-header () (defun um-journal-header ()
"Create a header composed of: "Create a header composed of:
@ -58,9 +56,8 @@
" "
(interactive) (interactive)
(insert (insert
(format "# %s\n: %s\n\n" (buffer-name) (um-iso-8601)) (format "# %s\n: %s\n\n" (buffer-name) (format-time-string um-date-format))
) ))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; find-file-at-point ;; find-file-at-point