Skip to content

Instantly share code, notes, and snippets.

View marcowahl's full-sized avatar
🌴
On vacation

Marco Wahl marcowahl

🌴
On vacation
View GitHub Profile
@marcowahl
marcowahl / org-structure-as-dirs-and-files.el
Last active December 20, 2019 06:39
org-save-org-structure-as-dir-file-skeleton to save the org structure as dirs and files (marked with tag :file:)
(defun org-interpret-org-as-dir-file-skeleton ()
"Return the outline paths as lists.
Separated in those headlines not tagged 'file' and those tagged with 'file'."
(let (output-files output-dirs)
(org-map-entries
(lambda ()
(let* ((headline (car (cddddr (org-heading-components))))
(headline-path
(reverse
(cons
;; little idea about showing an orgee as top level
;; 'orgee' is a nick for org subtree
(let (overlays it-s-on)
(defun org-decorate-as-top-level-tree-establish ()
(interactive)
(let (first-level)
(org-map-entries
(lambda ()