diff --git a/custom/refile.el b/custom/refile.el index 7ff0267..ff98a3d 100644 --- a/custom/refile.el +++ b/custom/refile.el @@ -20,6 +20,17 @@ (let ((org-refile-targets '((orgfilepath :maxlevel . 1)))) (org-refile))) +(defun filemusic () + "Refile heading to specific file based on heading (music edition)" + (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 "music") + (let ((org-refile-targets '((orgfilepath :maxlevel . 1)))) + (org-refile))) + (defun filedate () "Insert timestamp if required based on file name" (interactive)