For a year or so I've used Bernt Hansen's good org-mode workflow and init file, with a couple small adaptations. http://doc.norang.ca/org-mode.html

I'm almost done setting up org-mode on a new computer (new job) but I can't get refile working properly.

From the agenda, when I use C-c C-w for single refile or m B r for bulk refile, I get the Refile to: prompt as expected. But there are no target options displayed.

On my previous computer, I had a nice list of target locations to select from (similar in look+functionality to C-x b, but the Refile to: list also included headlines ... I'm not sure what this is called ... IDO?). I would like to have this functionality again.

This part of init.el looks correct:

; Targets include this file and any file contributing to the agenda - up to 9 levels deep
(setq org-refile-targets (quote ((nil :maxlevel . 9)
                                 (org-agenda-files :maxlevel . 9))))

and IDO is turned on:

; Use IDO for both buffer and file completion and ido-everywhere to t
(setq org-completion-use-ido t)
(setq ido-everywhere t)
(setq ido-max-directory-size 100000)
(ido-mode (quote both))
; Use the current window when visiting files and buffers with ido
(setq ido-default-file-method 'selected-window)
(setq ido-default-buffer-method 'selected-window)
; Use the current window for indirect buffer display
(setq org-indirect-buffer-display 'current-window)

Where can I look next to troubleshoot this?

up vote 1 down vote accepted

See section 7.1 ("Refile Setup") of the source cited by the original poster.

One option would be to enable ido-mode and set the variable org-completion-use-ido to t.

Another option would be to use the tab key to open up the completions buffer.

Another option would be to use the up/down arrow keys to navigate potential completions in the mini-buffer.

  • Thanks @lawlist. ido-mode is already on with the variable you mention set to true. I added that part of my init to the question above. – andytilia Jan 16 '17 at 20:14
  • 1
    I recommend recursively bisecting your user-configuration file to find the problem, because this answer works with emacs -q. I can open Emacs 25.1 with no user-configuration, go to the *scratch* buffer, save it as a file to the desktop such as foo.org, create three simple headings at the first level, evaluate (setq org-completion-use-ido t) and type M-x ido-mode, and then place my cursor on any of the headings and type M-x org-refile, and I am presented with ido-style choices. – lawlist Jan 16 '17 at 21:06
  • Thanks @lawlist. I tried recursively bisecting my init but there were too many dependencies (ie. I needed agenda to test refile, etc). More importantly I learned that my init contained too much that I didn't understand. So I started over and rebuilt my init, following a "literate programming" approach (sachachua.com/blog/2012/06/…). Now my refile+IDO works as expected, and more importantly I understand my init better. Thanks for your help. – andytilia Jan 22 '17 at 14:35

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.