From 5b16cd24803de03f034cad94c51fca41aeeebd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Tue, 2 Jan 2024 22:23:14 +0000 Subject: [PATCH] Add refile function for scrobbles --- custom/refile.el | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)