emacs - dired: M-x find-dired: 禁用历史记录?

标签 emacs dired

我设置了 (setq find-args "-iname ") 以便 M-x find-dired 给我 ... "Run find (with args): -iname “作为默认值。然而,它似乎还记得它的历史。有没有办法禁用历史记录并始终以默认参数“-iname”开头?我尝试修改 find-args-history 但没有成功。

最佳答案

您必须每次都使用函数 marius/find-dired 而不是 find-dired,如 answer 中所示.例如。像这样设置 (global-set-key (kbd "C-x g") 'marius/find-dired)。每次调用 find-grep 之前,它都会调用 (setq find-args "-iname ...")

编辑:不重命名:

(setq find-args '("-iname '**'" . 10))
(defadvice find-dired (after eab-find-dired activate)
  (setq find-args '("-iname '**'" . 10)))

停用:

(ad-remove-advice 'find-dired 'after 'eab-find-dired)
(ad-deactivate 'find-dired)

EDIT2:我们在这里使用after-advice,查看评论。

关于emacs - dired: M-x find-dired: 禁用历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14602400/

相关文章:

emacs - 如何在emacs dired中为M命令(更改文件模式)提供递归选项(-R)?

windows - 告诉 Emacs 在特定窗口中打开新缓冲区

正则表达式字符集(例如 [[ :word:]]) and backslash construct (e. g.\sw): is there preference of one over the other?

emacs - 在 Dired 中递归打开一些目录

emacs - 如何在 Emacs 中解压/解压

emacs - 如何让 Emacs Dired 使用不区分大小写的字母顺序

python - flake8 不支持全局配置。埃尔比

macos - OS X 上的 Emacs 23 - 使用多个实例还是 emacsclient?

assembly - 如何为 PIC 汇编代码设置 emacs

emacs - dired:如何获得真正可读的输出(find-ls-option)