简体   繁体   中英

Emacs org mode 9.x refile not working with ido

Since I upgraded orgmode to 9.x, refile is no longer working with ido. According to http://orgmode.org/Changes.html , all options related to ido and iswitchb have been removed. It also mentions "Instead Org uses regular functions, eg, completion-read so as to let those libraries operate."

However, being a recent vim-user-turned-emacs, I can't find how to setup ido (including ido-vertical) to work in orgmode 9.x the way it used to work in 8.x Any suggestion welcome.

Thanks in advance.

Cheers /jerome

I think the only way to do this is to re-define or wrap the stock emacs completion functions. ido-completing-read+ is a package that wraps the stock completion functions to use ido wherever possible (including in org-refile), and you can configure exceptions.

That package is a bit aggressive in that it tries to enable IDO everywhere . If you don't want that, you can set the completing read function to IDO's completing read function in org mode only by adding a function to the org mode hook:

(defun bl/completion-use-ido ()
  "Set the current buffer's completing read engine to IDO."
  (setq-local completing-read-function #'ido-completing-read))

(add-hook 'org-mode-hook 'bl/completion-use-ido)

That will enable IDO completion for only org-mode buffers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM