help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: next-error for dired-find?


From: Andreas Politz
Subject: Re: next-error for dired-find?
Date: Thu, 26 Feb 2009 05:06:06 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

Mike Halloran wrote:
Is there a good way to run a file search, and use the c-x backtick (c-
x `) (next-error) command to jump to each file?

c-x backtick works with grep, and grep-find. Basically, I am looking
to do a quick browse through each cpp file in my source tree.

Any thoughts?



A quick look at `next-error-function' lead me to this most
simplistic solution. Maybe this already implemented somewhere,
I can't tell.

(defun dired-next-error-function (arg reset)
  (dired-next-line arg)
  (dired-advertised-find-file))

;; this is just one way to set the local `next-error-function'
;; variable
(add-hook 'dired-mode-hook
          #'(lambda nil
              (setq next-error-function 'dired-next-error-function)))


-ap


reply via email to

[Prev in Thread] Current Thread [Next in Thread]