Find-dired:迷你缓冲区提示"在目录中运行find"而不是"运行find(with args)"

时间:2016-08-29 10:48:03

标签: emacs

我正在关注在emacs中搜索和查找的教程。 (我在Windows上运行它。)

这个家伙类型:     Find-dired 而在Mini-Buffer中。因此,Mini-Buffer提示:     Run find in directory。 到目前为止,我得到了相同的结果。

然后他输入了一些内容来获取Mini-Buffer提示符     Run find (with args) 而且我不知道他输入的内容是为了得到这个结果。

有人知道在输入Run find (with args)后如何获得Find-dired吗?

由于

1 个答案:

答案 0 :(得分:1)

呃,这正是find-dired所做的。首先,它会提示您输入目录,然后它会提示您输入find命令参数:

(interactive (list (read-directory-name "Run find in directory: " nil "" t)
                   (read-string "Run find (with args): " find-args '(find-args-history . 1))))

C-h f find-dired告诉你命令的作用以及它的参数是什么。它告诉您有两个参数:一个目录和传递给命令find的参数。

find-dired is an interactive autoloaded compiled Lisp function in
‘find-dired.el’.

(find-dired DIR ARGS)

Run ‘find’ and go into Dired mode on a buffer of the output.
The command run (after changing into DIR) is essentially

find . \( ARGS \) -ls

except that the car of the variable ‘find-ls-option’ specifies what to
use in place of "-ls" as the final argument.