【问题标题】:Emacs org mode 9.x refile not working with idoEmacs org mode 9.x refile 不适用于 ido
【发布时间】:2017-07-06 19:54:56
【问题描述】:

自从我将 orgmode 升级到 9.x 后,refile 不再使用 ido。根据http://orgmode.org/Changes.html 的说法,所有与 ido 和 iswitchb 相关的选项都已被删除。它还提到“Org 使用常规函数,例如完成读取,以便让这些库运行。”

但是,作为最近的 vim-user-turned-emacs,我找不到如何设置 ido(包括 ido-vertical)以在 orgmode 9.x 中像在 8.x 中那样工作 欢迎提出任何建议。

提前致谢。

干杯/杰罗姆

【问题讨论】:

标签: emacs org-mode


【解决方案1】:

我认为这样做的唯一方法是重新定义或包装现有的 emacs 完成函数。 ido-completing-read+ 是一个包,它封装了库存完成函数以尽可能使用 ido(包括在 org-refile 中),并且您可以配置异常。

那个包有点激进,它试图在任何地方启用 IDO。如果你不想这样,你可以在 org 模式下将完成读取功能设置为 IDO 在 org 模式下的完成读取功能,只需在 org 模式挂钩中添加一个函数即可:

(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)

这将只为 org-mode 缓冲区启用 IDO 完成。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-10
    相关资源
    最近更新 更多