diff options
author | Leon Rische <leon.rische@me.com> | 2020-05-24 14:57:13 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-05-24 14:57:13 +0200 |
commit | 8847d580bbc97c368ad4ce410f6e2f14a16e5d06 (patch) | |
tree | 1f328c26cc2177e705df5dc53df9a022321c0f0f /org-fc.el | |
parent | 619941b5ba26b936355f93c21067f6b70630b2c8 (diff) |
Change indexer to work on
Diffstat (limited to 'org-fc.el')
-rw-r--r-- | org-fc.el | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -1241,14 +1241,30 @@ ITAGS and LTAGS are strings `\":tag1:tag2:\"'" (org-remove-uninherited-tags (split-string itags ":" t)) (split-string ltags ":" t)))) +;; TODO: Refactor to something cleaner +(defun org-fc-flatten-index (index) + "Remove the file-level of an index." + (mapcan + (lambda (file) + (mapcar + (lambda (card) + (plist-put card :path (plist-get file :path))) + (plist-get file :cards))) + index)) + (defun org-fc-awk-index-paths (paths) "Generate a list of all cards and positions in PATHS." (mapcar - (lambda (card) - (plist-put card :tags - (org-fc--combine-tags - (plist-get card :inherited-tags) - (plist-get card :local-tags)))) + (lambda (file) + (plist-put file :cards + (mapcar + (lambda (card) + (plist-put + card :tags + (org-fc--combine-tags + (plist-get card :inherited-tags) + (plist-get card :local-tags)))) + (plist-get file :cards)))) (read (shell-command-to-string (org-fc-awk--pipe |