Add some functions for refiling journal entries
parent
fa406691ea
commit
776c570371
@ -0,0 +1,20 @@
|
|||||||
|
(defun filejournal ()
|
||||||
|
"Refile heading to specific file based on heading"
|
||||||
|
(interactive)
|
||||||
|
(setq orgheading (org-get-heading))
|
||||||
|
(setq orgyear (substring orgheading 0 4))
|
||||||
|
(setq orgmonth (substring orgheading 5 7))
|
||||||
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
||||||
|
(org-edit-headline "journal")
|
||||||
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
||||||
|
(org-refile)))
|
||||||
|
|
||||||
|
(defun filedate ()
|
||||||
|
"Insert timestamp based on file name"
|
||||||
|
(interactive)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(setq thedate (file-name-base))
|
||||||
|
(insert (concat "<" thedate ">"))
|
||||||
|
(org-ctrl-c-ctrl-c)
|
||||||
|
(insert "\n\n")
|
||||||
|
(goto-char (point-min)))
|
Loading…
Reference in New Issue