home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 986e4e6e01d58af827f13a9fd436b9b67334d3a5
parent 70ab597460661934db0a216b48e03ed7391d1269
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Tue,  4 May 2021 15:25:56 +0200

emacs: updates on journal capture and clocks

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-org.el | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/emacs/config/config-org.el b/tools/emacs/config/config-org.el @@ -432,16 +432,23 @@ and thus keeping the configuration source up-to-date" ("C-c o j" . org-journal-new-entry)) :init (defun org-journal-find-location () - "Open today's journal, but inhibiting inserting the heading, leaving that to the template." + "Go to the beginning of the today's journal file. + +This can be used for an org-capture template to create an entry in the journal." + ;; Open today's journal, but specify a non-nil prefix argument in order to + ;; inhibit inserting the heading; org-capture will insert the heading. (org-journal-new-entry t) - ;; position pont on the journal's top-level heading so that org-capture will add the new entry as a child. - (goto-char (point-max))) + ;; Position point on the journal's top-level heading so that org-capture + ;; will add the new entry as a child entry. + (widen) + (goto-char (point-min)) + (org-show-entry)) (add-to-list 'org-capture-templates `("j" "Journal")) (add-to-list 'org-capture-templates `("jj" "Journal entry" entry (function org-journal-find-location) "** %(format-time-string org-journal-time-format)%^{Title}\n%i%?" - :empty-lines 1 :clock-in t :clock-resume t)) + :empty-lines 1)) (add-to-list 'org-capture-templates `("je" "Weekly review" entry (function org-journal-find-location) (file ,(expand-file-name "etc/orgmode/weekly.org" user-emacs-directory))