following special values, the unquoted printed representation of
it is used:
-- `now' means the current time; see `pelican-mode-timestamp'.
+- `now' means the current time.
- `slug' means the file's path relative to the document root sans
extension; see `pelican-mode-default-slug'.
for this function to work correctly."
(interactive "sField: \nsValue: ")
(setq value (pcase value
- ('now (pelican-mode-timestamp))
+ ('now (format-time-string "%Y-%m-%d %H:%M"))
('slug (pelican-mode-default-slug))
('"" nil)
(_ value)))
\f
-(defun pelican-mode-timestamp (&optional time)
- "Generate a pelican-mode-compatible timestamp for TIME."
- (format-time-string "%Y-%m-%d %H:%M" time))
-
(defun pelican-mode-set-fields (&rest fields)
"Insert a Pelican header for an article with metadata FIELDS."
(mapc (apply-partially #'apply #'pelican-mode-set-field)