summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-08-20 00:35:40 +0100
committerYann Herklotz <git@yannherklotz.com>2022-08-20 00:35:40 +0100
commitc1f3ca9368a43638de7a0e78a0dceaa0f8943c37 (patch)
tree8e64377e533ef1f7cb5e236b7373bf3e27825e5f
parent5fa948014a06e9352c219bee4ef2315f9d32923b (diff)
parent7278052cb451178a2f1ffc61569156ca0adcc34a (diff)
downloadorg-zettelkasten-c1f3ca9368a43638de7a0e78a0dceaa0f8943c37.tar.gz
org-zettelkasten-c1f3ca9368a43638de7a0e78a0dceaa0f8943c37.zip
Merge remote-tracking branch 'origin/master'
-rw-r--r--ChangeLog6
-rw-r--r--org-zettelkasten.el6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 04379b6..0f18ee1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022 Yann Herklotz <git@ymhg.org>
+
+ * unreleased:
+
+ (org): Add modified date which can be added on a before-save-hook.
+
2022-05-03 Yann Herklotz <git@ymhg.org>
* v0.5.0: Add date stamps to org-zettelkasten entries.
diff --git a/org-zettelkasten.el b/org-zettelkasten.el
index 231cf6d..ddb862a 100644
--- a/org-zettelkasten.el
+++ b/org-zettelkasten.el
@@ -113,6 +113,12 @@ NEWHEADING: function used to create the heading and set the current
(org-zettelkasten-create-next)
(org-zettelkasten-create-branch))))
+(defun org-zettelkasten-update-modified ()
+ "Update the modified timestamp, which can be done on save."
+ (interactive)
+ (org-set-property "modified" (format-time-string
+ (org-time-stamp-format t t))))
+
(defvar org-zettelkasten-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "n" #'org-zettelkasten-create-dwim)