emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-refile and ivy


From: Gustavo Barros
Subject: Re: org-refile and ivy
Date: Fri, 22 Jan 2021 14:37:03 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi Eric,

On Fri, 22 Jan 2021 at 15:49, Eric S Fraga <e.fraga@ucl.ac.uk> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]