unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* "(setq grep-find-command ...)" broken, no documented replacement
@ 2007-07-22 16:47 Bob Rogers
  2007-07-22 20:05 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Rogers @ 2007-07-22 16:47 UTC (permalink / raw)
  To: emacs-devel

   Some time in the last two weeks (between builds from the trunk), my
.emacs customization of grep-find-command stopped working.  I had just
done a setq of grep-find-command:

	(setq grep-find-command
	      (concat "find . -type f "
		      "| grep -Ev '/\\.?#|~$|/TAGS$|/\.svn/|/CVS/|\.patch$' "
		      "| xargs -e grep -n -e "))

But now this does not work.  There appears to be new customization
mechanism in place, but I cannot find any documention for it.

   In particular, the "Grep Searching" Info node does not mention how to
customize this feature from elisp.  Previously, this wasn't a problem;
it was easy enough to stumble onto grep-find-command via M-x apropos, or
by reading the grep-find source, and then it was obvious how to
customize it.  This is no longer true; the grep-find-command variable
still has the following doc string:

	  "The default find command for \\[grep-find].
	The default value of this variable is set up by `grep-compute-defaults';
	call that function before using this variable in your program."

This is misleading at best; even setting grep-find-command *before*
grep-compute-defaults does not work.  The word "default" in the phrase
"The default value ... is set ..." makes it sound like it ought to be
otherwise.

   So, by reading the code for the new customization mechanism, I
discovered that I now have to do something like this:

	(grep-compute-defaults)
	(rplaca (cdr (assoc 'grep-find-command
			    (assoc 'localhost grep-host-defaults-alist)))
		(concat "find . -type f "
			"| grep -Ev '/\\.?#|~$|/TAGS$|/\.svn/|/CVS/|\.patch$' "
			"| xargs -e grep -n -e "))

But I hope this is not TRT; to me it looks terribly fragile.

   So, could we please restore the original (and straightforward) elisp
customization mechanism back to workingness?  At the very least, the new
customization mechanism needs to be better documented and/or the
documentation for it easier to find.

   And perhaps we ought to have a NEWS entry for the new customization
mechanism?

   TIA,

					-- Bob Rogers
					   http://rgrjr.dyndns.org/

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

end of thread, other threads:[~2007-07-24 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 16:47 "(setq grep-find-command ...)" broken, no documented replacement Bob Rogers
2007-07-22 20:05 ` Michael Albinus
2007-07-22 23:04   ` Bob Rogers
2007-07-24 14:53     ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).