From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4M/+KLAoC2DiCAAA0tVLHw (envelope-from ) for ; Fri, 22 Jan 2021 19:34:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yNDYJLAoC2BZWwAA1q6Kng (envelope-from ) for ; Fri, 22 Jan 2021 19:34:08 +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 0FBCC9403AC for ; Fri, 22 Jan 2021 19:34:08 +0000 (UTC) Received: from localhost ([::1]:39844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32C6-0006mD-Ot for larch@yhetil.org; Fri, 22 Jan 2021 14:34:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32BA-0006lU-Pl for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 14:33:08 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:44822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32B7-00056p-Qh for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 14:33:08 -0500 Received: by mail-pf1-x436.google.com with SMTP id t29so4475434pfg.11 for ; Fri, 22 Jan 2021 11:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=etit08RVAFnXyAxKTjvQ+AaFBi4bynjb2Syt6eTCuCg=; b=mNjDUcYyNLzOprtdkHeEch0QFbIIhTMJBfPevpIi0XQNWuUga0HuvTKMks8yAIlAhk 8ifojCehTitIWo+nZZLYcAtL4e2qxKEI9CGicYV5C+ho8nmqukL/Ju3eHL5UR5p4J5vc 6VLyKoHcmD9M17GYFV3OS0GHhGFIo569y5KwlgcmnFAbvEGCmmFJaluQwO6Kfu5LV1wd TanpydWSD9PCHNjdM9VU2utFz9eaM2SVirgkp0/98e9eKiXNxOse3PTEC80UOq7h6c6u hRulLMdSzxSC3I5yq3z/4KJouloPhp5inuH3qzN7JP6NX6CVOoUPgjOEOLbbAgNxuhRt swEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=etit08RVAFnXyAxKTjvQ+AaFBi4bynjb2Syt6eTCuCg=; b=D3J70tCqzocGb5Di7U3nnAoyC8mDBDEA7tNzvOL2dPjdLNcIgYPBzsiV2sZcEZiEUP PcDDMLgh/uuBGrkqsweY5kCxSt0KKu6Yo0euX4tYBpOP0Gb5jl0wEo4E8DFCI2woCAgm tlaRCNHMUAlYWJWLLTHAejOqsghEGrkrFEv7yi102K69FHn6ptYrMkEtQSs6dM38p9Mq JFo2U2EADE9VDSRzHsW5YNLPawf8baJSqGDTTXNIlCc/QL9k03ZraZMdbDy0IVytpPji tg0m5oLgSYhfJvd535qMnVXK9ZZ5fVjDlqlsiNWxJL3F7yqJRKpc82ckymZg55euA8JN ODJw== X-Gm-Message-State: AOAM532rDoTVkMcBRiKprwJ6uz2AICV5DxZ35MKh/7AOwJpF+7+h1iVb GuMqMZeHP6/LoX/k3bIhhQsj3hmRkSIxvQ== X-Google-Smtp-Source: ABdhPJzn+IUt+xildU8ZsBMfc9uj7KO4UfFXnyTjJ9RWNbI7fslEDg7Hwqtmd/sxSdByjuBT72uLAQ== X-Received: by 2002:a65:67cf:: with SMTP id b15mr6104021pgs.429.1611343982670; Fri, 22 Jan 2021 11:33:02 -0800 (PST) Received: from tim-desktop (203-206-4-196.dyn.iinet.net.au. [203.206.4.196]) by smtp.gmail.com with ESMTPSA id k141sm7802690pfd.9.2021.01.22.11.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 11:33:01 -0800 (PST) References: <87h7n9rmxs.fsf@ucl.ac.uk> <87v9borhz4.fsf@gmail.com> User-agent: mu4e 1.5.7; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: org-refile and ivy Date: Sat, 23 Jan 2021 06:24:20 +1100 In-reply-to: <87v9borhz4.fsf@gmail.com> Message-ID: <87eeicbwd2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=mNjDUcYy; dmarc=pass (policy=none) header.from=gmail.com; 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: 0FBCC9403AC X-Spam-Score: -3.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: g49Q1n9GiHK5 Gustavo Barros writes: > On Fri, 22 Jan 2021 at 15:49, Eric S Fraga wrote: > >> Dear all org mode list readers, >> >> I have been trying to get to grips with org-refile. For some reason, >> the completion mechanism (I use ivy generally but I have no idea what >> org-refile actually tries to do/use) only shows me the current file name >> if I have org-refile-targets set to nil. It doesn't show any top level >> headlines to choose from which is what I would expect from the >> documentation. Hitting RET to select the completion target given (file >> name only) refiles to the end of the file which is not what I want. >> >> This is with org updated fairly recently but not quite up to >> date. However, I've had this problem for a long time and don't use >> org-refile as a result. >> >> Any suggestions welcome. > > I use org-refile with ivy, so I might share. If I recall correctly, the > only thing that does not play well between the two is > `org-outline-path-complete-in-steps`. My basic setup is the following: > > #+begin_src emacs-lisp > (setq org-refile-targets > '((org-agenda-files :maxlevel . 6) > ;; 'nil' means consider headings of the current buffer > (nil :maxlevel . 6))) > (setq org-refile-use-outline-path 'file) > (setq org-outline-path-complete-in-steps nil) > #+end_src > > That should get you started. I personally like org-refile for its > quickness, so I do some extra work to filter out candidates of this list > and keeping only the frequent targets (with > `org-refile-target-verify-function'). And if something atypical arises, > I just go with kill-yank. > > Note however, on the relation of org-refile and ivy: > https://orgmode.org/list/87tuvrj7ww.fsf@gmail.com/ > I am using spacemacs, currently with helm, but have used it with ivy as well and I have the following setup for my org-refile, which I find works well for my purposes. org-refile-allow-creating-parent-nodes 'confirm org-refile-targets (quote ((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))) org-refile-use-outline-path t which allows me to type some of the 'path' name (e.g. outline heading or org file name) and it shows me appropriate candidates. I don't know if there is some spacemacs helm/ivy setup which plays a part here - it just works, so I've not looked any further. org version reports 9.4.4 -- Tim Cross