~l3kn/org-fc#27: 
Excluded Directories and/or Depth

I currently have my org directory structured something like the below:

~/org/*.org (agenda-files)
~/org/bibliography/notes/*.org (bibliography notes)
~/org/calendars/*.org (caldav synced calendars)
~/org/etc/org-fc/*.org (french/spanish vocab cards)
~/org/etc/rss/*.org (rss/podcast feeds)

Ideally I would like to include just the first level of files in ~/org and the ~/org/org-fc directory. Currently org-fc is slowed down by the fact it needs to scan the rather large org files in my bibliography. Can there be an option to exclude directories, or restrict the depth in the org-fc directories?

Status
REPORTED
Submitter
~kindablue
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

Leon Rische 2 years ago · edit

Org-fc uses find to get a list of files in the org-fc-directories, instead of just passing a list of strings to the indexing function, we could allow something like (:path "~/org/" :maxdepth 1) that limits the recursion depth but from the find manpage it seems like the maxdepth setting is applied to all paths.

Seems like there is also a way to exclude directories in find by using -prune or -not -path, this way review contexts could get an optional :exclude property with a list of files that should be excluded.

I have a prototype of a org-fc indexer that stores the indices in (Emacs) memory and uses sha1sum (much faster than processing each file with awk) to determine which files changed but there are still some bugs in it that I haven't figured out.

On 11/11/20 3:40 PM, ~kindablue wrote:

I currently have my org directory structured something like the below:

~/org/*.org (agenda-files)
~/org/bibliography/notes/*.org (bibliography notes)
~/org/calendars/*.org (caldav synced calendars)
~/org/etc/org-fc/*.org (french/spanish vocab cards)
~/org/etc/rss/*.org (rss/podcast feeds)

Ideally I would like to include just the first level of files in ~/org and the ~/org/org-fc directory. Currently org-fc is slowed down by the fact it needs to scan the rather large org files in my bibliography. Can there be an option to exclude directories, or restrict the depth in the org-fc directories?

~kindablue 2 years ago

Leon Rische outgoing@sr.ht writes:

Org-fc uses find to get a list of files in the org-fc-directories,

instead of just passing a list of strings to the indexing function, we could allow something like (:path "~/org/" :maxdepth 1) that limits

the recursion depth but from the find manpage it seems like the

maxdepth setting is applied to all paths.

Yeah, I was thinking this but it would result in needing find multiple times. I'm not sure it's with it..I've settled on using symlinks into the org-fc directory and just using that one.

Seems like there is also a way to exclude directories in find by using -prune or -not -path, this way review contexts could get an optional :exclude property with a list of files that should be excluded.

I have a prototype of a org-fc indexer that stores the indices in (Emacs) memory and uses sha1sum (much faster than processing each file with awk) to determine which files changed but there are still some bugs in it that I haven't figured out.

This would be great! Let me, or the list know if there's anything we can do to help.

On 11/11/20 3:40 PM, ~kindablue wrote:

I currently have my org directory structured something like the below:


~/org/.org (agenda-files) ~/org/bibliography/notes/.org (bibliography notes) ~/org/calendars/*.org (caldav synced calendars)

~/org/etc/org-fc/*.org (french/spanish vocab cards)

~/org/etc/rss/*.org (rss/podcast feeds)


Ideally I would
like to include just the first level of files in `~/org` and the
`~/org/org-fc` directory. Currently org-fc is slowed down by the fact it
 needs to scan the rather large org files in my bibliography. Can there
be an option to exclude directories, or restrict the depth in the org-fc
 directories?


-- Trey Peacock

~l3kn 2 years ago

I've added my cache prototype, see https://todo.sr.ht/~l3kn/org-fc/9 for details on how to try it out.

Let me know if you run into any problems with it, I can't remember what went wrong the last time I tried it. I'll keep the cache mode activated and see what happens.

Register here or Log in to comment, or comment via email.