开发者

copy paste various files using dired on emacs while using ido.el

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 ma开发者_JAVA百科ke dired paste the selected files to the new destination? Any help appreciated, thank you.


Try C-j once you are in the target directory in ido. Works for me.


The basic problem here is that while there's a read-file-name-function which ido can attach itself to, there's no read-directory-name-function, ido-mode has no explicit support for this feature of dired, and there's nothing about the read-file-name invocation I could figure out that ido-mode could hook onto.

All I can suggest is to just turn off ido by using C-f. The invocation of read-file-name by dired is so many levels deep that it wouldn't even be particularly elegant to patch:

* 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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜