diff --git a/elisp/um.el b/elisp/um.el index e92536a..86571c4 100644 --- a/elisp/um.el +++ b/elisp/um.el @@ -40,14 +40,12 @@ (defvar um-journal-path-glob ".*/writing/journal" "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 -(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 (defun um-journal-header () "Create a header composed of: @@ -56,11 +54,10 @@ : date " - (interactive) - (insert - (format "# %s\n: %s\n\n" (buffer-name) (um-iso-8601)) - ) - ) + (interactive) + (insert + (format "# %s\n: %s\n\n" (buffer-name) (format-time-string um-date-format)) + )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; find-file-at-point