|
|
@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
(defun filedate ()
|
|
|
|
|
|
|
|
"Insert timestamp if required based on file name"
|
|
|
|
|
|
|
|
(interactive)
|
|
|
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
|
|
|
(unless (eq ?< (char-after))
|
|
|
|
|
|
|
|
(setq thedate (file-name-base))
|
|
|
|
|
|
|
|
(insert (concat "<" thedate ">"))
|
|
|
|
|
|
|
|
(org-ctrl-c-ctrl-c)
|
|
|
|
|
|
|
|
(insert "\n\n")
|
|
|
|
|
|
|
|
(goto-char (point-min))))
|
|
|
|
|
|
|
|
|
|
|
|
(defun filejournal ()
|
|
|
|
(defun filejournal ()
|
|
|
|
"Refile heading to specific file based on heading (journal edition)"
|
|
|
|
"Refile heading to specific file based on heading (journal edition)"
|
|
|
|
(interactive)
|
|
|
|
(interactive)
|
|
|
@ -5,9 +16,13 @@
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
|
|
|
|
(setq orgbuffername (concat orgheading ".org"))
|
|
|
|
(org-edit-headline "journal")
|
|
|
|
(org-edit-headline "journal")
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(org-refile)))
|
|
|
|
(org-refile))
|
|
|
|
|
|
|
|
(with-current-buffer orgbuffername
|
|
|
|
|
|
|
|
(filedate)
|
|
|
|
|
|
|
|
(write-file orgbuffername)))
|
|
|
|
|
|
|
|
|
|
|
|
(defun filediscord ()
|
|
|
|
(defun filediscord ()
|
|
|
|
"Refile heading to specific file based on heading (discord edition)"
|
|
|
|
"Refile heading to specific file based on heading (discord edition)"
|
|
|
@ -16,9 +31,13 @@
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
|
|
|
|
(setq orgbuffername (concat orgheading ".org"))
|
|
|
|
(org-edit-headline "discord")
|
|
|
|
(org-edit-headline "discord")
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(org-refile)))
|
|
|
|
(org-refile))
|
|
|
|
|
|
|
|
(with-current-buffer orgbuffername
|
|
|
|
|
|
|
|
(filedate)
|
|
|
|
|
|
|
|
(write-file orgbuffername)))
|
|
|
|
|
|
|
|
|
|
|
|
(defun filemusic ()
|
|
|
|
(defun filemusic ()
|
|
|
|
"Refile heading to specific file based on heading (music edition)"
|
|
|
|
"Refile heading to specific file based on heading (music edition)"
|
|
|
@ -27,17 +46,10 @@
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgyear (substring orgheading 0 4))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgmonth (substring orgheading 5 7))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
(setq orgfilepath (concat "~/Documents/drive/org/journal/" orgyear "/" orgmonth "/" orgheading ".org"))
|
|
|
|
|
|
|
|
(setq orgbuffername (concat orgheading ".org"))
|
|
|
|
(org-edit-headline "music")
|
|
|
|
(org-edit-headline "music")
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(let ((org-refile-targets '((orgfilepath :maxlevel . 1))))
|
|
|
|
(org-refile)))
|
|
|
|
(org-refile))
|
|
|
|
|
|
|
|
(with-current-buffer orgbuffername
|
|
|
|
(defun filedate ()
|
|
|
|
(filedate)
|
|
|
|
"Insert timestamp if required based on file name"
|
|
|
|
(write-file orgbuffername)))
|
|
|
|
(interactive)
|
|
|
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
|
|
|
(unless (eq ?< (char-after))
|
|
|
|
|
|
|
|
(setq thedate (file-name-base))
|
|
|
|
|
|
|
|
(insert (concat "<" thedate ">"))
|
|
|
|
|
|
|
|
(org-ctrl-c-ctrl-c)
|
|
|
|
|
|
|
|
(insert "\n\n")
|
|
|
|
|
|
|
|
(goto-char (point-min))))
|
|
|
|
|
|
|
|