在使用 ido.el 的同时,在 emacs 上使用 dired 复制粘贴各种文件
我将 emacs 与 dired
(require 'dired-details)
(dired-details-install)
和 ido
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
(setq ido-use-filename-at-point 'guess)
(setq ido-create-new-buffer 'always)
一起使用(以及最近描述的 此处)
但是,当我处于 Dired 状态并在选择几个文件后进行复制(Shift-C)时, 并转到应粘贴它们的新目录...我有两个不起作用的选项: 1)要么我单击一个目录,然后进一步进入我不想要的目录。 2)我点击一个文件并 艾多抱怨
标记副本:目标必须是 目录:
如何将选定的文件直接粘贴到新的目的地? 任何帮助表示感谢,谢谢。
I'm using emacs with dired,
(require 'dired-details)
(dired-details-install)
and ido,
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
(setq ido-use-filename-at-point 'guess)
(setq ido-create-new-buffer 'always)
(as well as recentf as described here)
However, when I'm in dired and do copy (Shift-C) after selecting a few files,
and go to the new directory where they should be pasted ... I have two non-working options:
1) either I click on a directory and go a level further into a directory I don't want.
2) I click on a file and
ido complains
Marked Copy: target must be a
directory:
How can I make dired paste the selected files to the new destination?
Any help appreciated, thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(2)
这里的基本问题是,虽然有一个 ido 可以将其自身附加到的 read-file-name-function ,但没有 read-directory-name-function< /code>,ido-mode
没有明确支持 dired
的此功能,并且没有关于 read-file-name
调用的信息可以弄清楚 ido-mode 可以挂接。
我所能建议的就是使用 Cf
关闭 ido
。 dired 对 read-file-name 的调用深度如此之多,以至于修补起来也不是特别优雅:
* read-file-name("Copy <file> to: " "<dir>/" "<dir>/<file>")
apply(read-file-name ("Copy <file> to: " "<dir>/" "<dir>/<file>"))
dired-mark-pop-up(nil copy ("<file>") read-file-name "Copy <file> to: " "<dir>/" "<dir>/<file>")
dired-mark-read-file-name("Copy %s to: " "<dir>/" copy nil ("<file>") "<dir>/<file>")
dired-do-create-files(copy dired-copy-file "Copy" nil 67 nil nil)
dired-do-copy(nil)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
进入 ido 的目标目录后尝试 Cj。对我有用。
Try C-j once you are in the target directory in ido. Works for me.