Skip to content

Commit

Permalink
update CREATED property before inserting new entry to avoid duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
julopezc-acciona committed Oct 24, 2023
1 parent 870bdd9 commit ba78903
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/org-journal.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; org-journal with three different journals

(defun lytex/update-org-journal-created ()
(defun lytex/update-org-journal-created (&rest args)

(org-journal--open-entry)
(org-up-heading-safe)
Expand Down Expand Up @@ -65,12 +65,15 @@

(defun lytex/set-org-journal-J ()
(interactive)
(advice-remove #'org-journal-new-entry #'lytex/update-org-journal-created )
(lytex/set-org-journal "J"))
(defun lytex/set-org-journal-I ()
(interactive)
(advice-remove #'org-journal-new-entry #'lytex/update-org-journal-created )
(lytex/set-org-journal "I"))
(defun lytex/set-org-journal-W ()
(interactive)
(advice-add #'org-journal-new-entry :before #'lytex/update-org-journal-created )
(lytex/set-org-journal "W"))

;; https://systemcrafters.net/build-a-second-brain-in-emacs/5-org-roam-hacks/#automatically-copy-or-move-completed-tasks-to-dailies
Expand Down

0 comments on commit ba78903

Please sign in to comment.