I'd like to use an `org-ql' query in order to get eligible targets when calling `org-refile'. It doesn't seem `org-refile-targets' supports something like passing a function that returns the desired targets. Is it possible through some other means? If not, would a patch to `org-refile-get-targets' controlled by a new type in `org-refile-targets' be welcome? Thanks, Kevin Foley
alpha-org-refile-target-verify-function is all i know of. On 1/29/21, Kevin Foley <kevin@kevinjfoley.me> wrote: > I'd like to use an `org-ql' query in order to get eligible targets when > calling `org-refile'. > > It doesn't seem `org-refile-targets' supports something like passing a > function that returns the desired targets. Is it possible through some > other means? > > If not, would a patch to `org-refile-get-targets' controlled by a new > type in `org-refile-targets' be welcome? > > Thanks, > Kevin Foley > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
oops, i meant org-refile-target-verify-function variable. On 1/29/21, Samuel Wales <samologist@gmail.com> wrote: > alpha-org-refile-target-verify-function is all i know of. > > On 1/29/21, Kevin Foley <kevin@kevinjfoley.me> wrote: >> I'd like to use an `org-ql' query in order to get eligible targets when >> calling `org-refile'. >> >> It doesn't seem `org-refile-targets' supports something like passing a >> function that returns the desired targets. Is it possible through some >> other means? >> >> If not, would a patch to `org-refile-get-targets' controlled by a new >> type in `org-refile-targets' be welcome? >> >> Thanks, >> Kevin Foley >> >> >> > > > -- > The Kafka Pandemic > > Please learn what misopathy is. > https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
Kevin Foley <kevin@kevinjfoley.me> writes: > I'd like to use an `org-ql' query in order to get eligible targets when > calling `org-refile'. > I actually also wanted to do that a couple of weeks ago. I ended up using org-ql and completing-read to select a target. The last optional argument to org-refile lets you specify a location to refile to. I have shared this code in my dotfiles: https://github.com/Zetagon/literate-dotfiles/blob/master/config.org#refiling . Keep in mind that it depends on dash.el too. I also discussed this in an issue in org-ql: https://github.com/alphapapa/org-ql/issues/177