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 gLNyCXENC2ArBgAA0tVLHw (envelope-from ) for ; Fri, 22 Jan 2021 17:37:53 +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 gNpFBXENC2BPDwAA1q6Kng (envelope-from ) for ; Fri, 22 Jan 2021 17:37:53 +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 5CD9F94029C for ; Fri, 22 Jan 2021 17:37:52 +0000 (UTC) Received: from localhost ([::1]:59690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l30Na-0005kl-RL for larch@yhetil.org; Fri, 22 Jan 2021 12:37:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l30My-0005jO-7I for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 12:37:12 -0500 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:39782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l30Mw-0000pw-J2 for emacs-orgmode@gnu.org; Fri, 22 Jan 2021 12:37:12 -0500 Received: by mail-qt1-x830.google.com with SMTP id z9so4691158qtv.6 for ; Fri, 22 Jan 2021 09:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=eBbBxc+AEWTuJWYgLO+uLtZAxv4CShv7jIbBe6wT12c=; b=nFrOMFmyx/wwLqHD3kBR8RWPR7P0bzTkIrjnyWNnezHrahg+No0nlyhrW1tYPze8b9 vUg6JX70aoN7DdoBlU8ciw4wZN9nVd1NEIw++e72leOWbDnZHGwDURXkTLxi5bYkLlNa W6JZ7EwXA1zt0hqvOS/sxkkkd6tYyMeptWDOjr+92nbqYj2j1OazNuaOIChSXdVb2/h7 PxD5zuJASjDLBfDg41LaiZ62EpSxkArbJf9BWRF+bC27jghRlVvs4OXm8w8IEyyxiDFK YS4sFBVfO84fx0BOubm+hE9BmcMLasqzzFc7eomYTbxFeYeJsOTPio/VSNTeWzwUqVGm os2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=eBbBxc+AEWTuJWYgLO+uLtZAxv4CShv7jIbBe6wT12c=; b=XUufrwOyuK0VGBFIlBmJHp5j9R9//PKY9jkFKMySn+68OJozK1KMcO0WVTafIigLuy /0VL5OR/dbQvQp/MuR8AO5lWozjTPZJDjTSTIMyJP04hm/7FpvgH8v9sZ14gfQiVwgOd RoPzWCYAJfdWO1c2tSqKH+/7mc/XO9fWI8RDBkRLOBA+CRoLXp6B9A9nKDGrk8VvLWEW MxlTOD8N9Q4W292qWGk0l+ZENQIB/Cgmwd7mdv+UFUQQLpQpYE9W9uVocOmYWxZdyu0e jSU2KacdFS0oHhExf4qHEkhgdiyWFIVQH3WelFDmglRUMiz799nuqz/hbiatTN7WZ+AD IkDA== X-Gm-Message-State: AOAM533HusnWE5MdjtuCmKHzFkxJEL8Ns/Bloe4gHeOz4fdC2prBHLRl 62Wjkv30PEC0xq9Be3R8XtvObzMFwzaOIQ== X-Google-Smtp-Source: ABdhPJxy6FzO7Rys30fBKdSHPAH9PFeZFbrQUy5+Ua5NaUF31ohq6dUAo1DA5dGle73fpBMJGYF0eg== X-Received: by 2002:ac8:7c97:: with SMTP id y23mr5414344qtv.350.1611337028579; Fri, 22 Jan 2021 09:37:08 -0800 (PST) Received: from gusbrs-laptop ([91.149.244.25]) by smtp.gmail.com with ESMTPSA id b78sm6746032qkg.29.2021.01.22.09.37.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 09:37:07 -0800 (PST) From: Gustavo Barros To: Emacs Org mode mailing list Subject: Re: org-refile and ivy In-Reply-To: <87h7n9rmxs.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Fri, 22 Jan 2021 15:49:51 +0000") References: <87h7n9rmxs.fsf@ucl.ac.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Fri, 22 Jan 2021 14:37:03 -0300 Message-ID: <87v9borhz4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=gusbrs.2016@gmail.com; helo=mail-qt1-x830.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=nFrOMFmy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 5CD9F94029C X-Spam-Score: -1.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: LDG/L02twyy3 Hi Eric, 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/ HTH, Gustavo.