Dired: Mx find-dired: disable history?

I set (setq find-args "-iname ")

to M-x find-dired

give me ... "Run find (with args): -iname" by default. However, he seems to remember his story. Is there a way to disable history and always start with the default "-iname" argument? I tried to change find-args-history

without success.

+3


source to share


1 answer


You should use the function marius/find-dired

every time instead find-dired

as shown in answer . For example. set up something like this (global-set-key (kbd "C-x g") 'marius/find-dired)

. It calls (setq find-args "-iname ...")

every time before calling find-grep

.

EDIT: without renaming:

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

      



to deactivate:

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

      

EDIT2: here we are using after-advice

, see comments.

+2


source







All Articles