gizmomogwai / org-kanban

Kanban table for org-mode
MIT License
238 stars 18 forks source link

Subdirectories in `:scope` #38

Closed pieterhijma closed 2 years ago

pieterhijma commented 2 years ago

Currently, it is not possible to have files in subdirectories in a :scope tag. The example below is not possible:

#+BEGIN: kanban :scope (a.org dir/b.org dir/c.org)
#+END

One of the problems is that find-file maintains the current working directory as state, trying to locate a.org, dir/b.org, and then dir being the current working directory effectively dir/dir/c.org. However, this problem not only exists in org-kanban, but also in org-mode itself, so wrapping this in a (with-temp-buffer) is only a partial solution. Since the files in :scope are given to org-agenda functions to check, and org-agenda has an interface to add agenda files (C-c [) resulting in absolute pathnames to be stored, it may be better to treat the files in :scope in the same way.

I will submit a pull request for this.

pieterhijma commented 2 years ago

The pull request is #39.

This pull request now supports the above example (because pathnames are made absolute), and it allows to use a directory, so if dir has files b.org and c.org in it, the following code would be equivalent to the example above:

#+BEGIN: kanban :scope (a.org dir)
#+END
gizmomogwai commented 2 years ago

I like it as it worked out. Lets see what comes of it!