emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Refile Targets Custom Function Support
@ 2021-01-30  1:56 Kevin Foley
  2021-01-30  2:18 ` Samuel Wales
  2021-01-30 11:11 ` Leo
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Foley @ 2021-01-30  1:56 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Refile Targets Custom Function Support
  2021-01-30  1:56 Refile Targets Custom Function Support Kevin Foley
@ 2021-01-30  2:18 ` Samuel Wales
  2021-01-30  2:18   ` Samuel Wales
  2021-01-30 11:11 ` Leo
  1 sibling, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2021-01-30  2:18 UTC (permalink / raw)
  To: Kevin Foley; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Refile Targets Custom Function Support
  2021-01-30  2:18 ` Samuel Wales
@ 2021-01-30  2:18   ` Samuel Wales
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2021-01-30  2:18 UTC (permalink / raw)
  To: Kevin Foley; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Refile Targets Custom Function Support
  2021-01-30  1:56 Refile Targets Custom Function Support Kevin Foley
  2021-01-30  2:18 ` Samuel Wales
@ 2021-01-30 11:11 ` Leo
  1 sibling, 0 replies; 4+ messages in thread
From: Leo @ 2021-01-30 11:11 UTC (permalink / raw)
  To: Kevin Foley, emacs-orgmode

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-30 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30  1:56 Refile Targets Custom Function Support Kevin Foley
2021-01-30  2:18 ` Samuel Wales
2021-01-30  2:18   ` Samuel Wales
2021-01-30 11:11 ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).