在直接缓冲区中获取ido

Mar*_*ert 5 emacs dired ido

我经常使用dired-mode,最近我开始使用ido:

(ido-mode 1); enable ido-mode
(setq ido-enable-flex-matching t); flexibly match names via fuzzy matching
(setq ido-everywhere t); use ido-mode everywhere, in buffers and for finding files
(setq ido-use-filename-at-point 'guess); for find-file-at-point
(setq ido-use-url-at-point t); look for URLs at point
(setq ffap-require-prefix t); get find-file-at-point with C-u C-x C-f 
Run Code Online (Sandbox Code Playgroud)

当我C在一个直接缓冲区中复制一个文件(带)时,我仍然需要使用"标准方式"来给出复制文件的新位置.这意味着,我必须使用标准的TAB完成,但没有ido完成.这同样适用于R移动文件等.因此,我想知道是否有可能得到ido同样作用于CR在dired缓冲区?

ass*_*sem 6

看起来我遇到了同样的问题.一些调查显示我们需要覆盖read-file-name-function默认情况下调用的变量read-file-name-function-default.但是,查看源代码ido-everywhere(这是一种次要模式),它为我们做到了这一点.

解:

而不是做(setq ido-everywhere t),用以下内容替换:

(ido-everywhere t)

这为我修复了它,导致ido-read-file-name在使用C或类似时调用dired缓冲区.

另外一个选项:

您可能还会考虑这个增强版本ido-everywhere:

https://github.com/DarwinAwardWinner/ido-ubiquitous

;;; Commentary:

;; You may have seen the `ido-everywhere' variable in ido.el and got
;; excited that you could use ido completion for everything. Then you
;; were probably disappointed when you realized that it only applied
;; to *file names* and nothing else. Well, ido-ubiquitous is here to
;; fulfill the original promise and let you use ido completion for
;; (almost) any command that uses `completing-read' to offer you a
;; choice of several alternatives.
Run Code Online (Sandbox Code Playgroud)