all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customize grep-find-command for each invocation
@ 2006-08-29 20:02 weiqingh
  2006-08-30  2:00 ` wenbinye
  0 siblings, 1 reply; 3+ messages in thread
From: weiqingh @ 2006-08-29 20:02 UTC (permalink / raw)


hi there,

i want to set the grep-find-command differently based on each file.
(basically i need to search from a certain directory based on where the
file is). what's the best way to do it? i tried to write a new function
like this:

(defun rails-search()
  (interactive)
  ;; set grep-find-command based on value of root
  (rails-core:with-root (root)
  (setq grep-find-command (cons (concat "find " root " -name \"*.rb\" |
xargs -exec grep -i -n -s ") (+ 34 (length root))))

  (grep-find)
 )
)

when trying to run the new function, it gave me "wrong number of
arguments". i guess i need to pass arguments to grep-find. but how? i
wanted to grep-find to take the input for search string... 

thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-30 20:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-29 20:02 customize grep-find-command for each invocation weiqingh
2006-08-30  2:00 ` wenbinye
2006-08-30 20:55   ` weiqingh

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.