From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp1 ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms11 with LMTPS
	id OF6iHBk/FWCOBwAA0tVLHw
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 30 Jan 2021 11:12:25 +0000
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1 with LMTPS
	id cNtzGBk/FWBjDAAAbx9fmQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 30 Jan 2021 11:12:25 +0000
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id D76F0940430
	for <larch@yhetil.org>; Sat, 30 Jan 2021 11:12:24 +0000 (UTC)
Received: from localhost ([::1]:37936 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1l5oAx-0001XG-Hp
	for larch@yhetil.org; Sat, 30 Jan 2021 06:12:23 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45404)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@relevant-information.com>)
 id 1l5oA8-0001Uo-Mk
 for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 06:11:32 -0500
Received: from mout-p-101.mailbox.org ([2001:67c:2050::465:101]:62908)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <leo@relevant-information.com>)
 id 1l5oA4-00011Y-9f
 for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 06:11:31 -0500
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:1:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4DSWjg1Y39zQlNs;
 Sat, 30 Jan 2021 12:11:19 +0100 (CET)
X-Virus-Scanned: amavisd-new at heinlein-support.de
Received: from smtp1.mailbox.org ([80.241.60.240])
 by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de
 [80.241.56.115]) (amavisd-new, port 10030)
 with ESMTP id 7isxICXrqAPR; Sat, 30 Jan 2021 12:11:15 +0100 (CET)
From: Leo <leo@relevant-information.com>
To: Kevin Foley <kevin@kevinjfoley.me>, emacs-orgmode@gnu.org
Subject: Re: Refile Targets Custom Function Support
In-Reply-To: <m2v9bfw5km.fsf@ip-192-168-50-252.ec2.internal>
References: <m2v9bfw5km.fsf@ip-192-168-50-252.ec2.internal>
Date: Sat, 30 Jan 2021 12:11:03 +0100
Message-ID: <87zh0q3cjc.fsf@leo-B85-HD3.i-did-not-set--mail-host-address--so-tickle-me>
MIME-Version: 1.0
Content-Type: text/plain
X-MBO-SPAM-Probability: 
X-Rspamd-Score: -6.03 / 15.00 / 15.00
X-Rspamd-Queue-Id: F10C71850
X-Rspamd-UID: 94697f
Received-SPF: pass client-ip=2001:67c:2050::465:101;
 envelope-from=leo@relevant-information.com; helo=mout-p-101.mailbox.org
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
X-Migadu-Spam-Score: -2.35
Authentication-Results: aspmx1.migadu.com;
	dkim=none;
	dmarc=none;
	spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org
X-Migadu-Queue-Id: D76F0940430
X-Spam-Score: -2.35
X-Migadu-Scanner: scn0.migadu.com
X-TUID: qMcPdpI4IcEN

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