From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: find-grep-dired - default directory to start with (SOLVED) Date: Tue, 28 Jul 2015 16:18:13 +0200 Message-ID: <878ua0icwq.fsf@web.de> References: <55B774B6.4090901@senfdax.de> <55B7790B.1090208@yandex.ru> <55B77E15.7000000@senfdax.de> <55B77EC8.7060402@yandex.ru> <55B782A7.4050201@senfdax.de> <55B784DE.9070007@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438093139 25249 80.91.229.3 (28 Jul 2015 14:18:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 14:18:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 16:18:50 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZK5iU-0004BJ-DG for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 16:18:50 +0200 Original-Received: from localhost ([::1]:58888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5iO-0006aG-IK for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 10:18:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5iB-0006Yb-Oo for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:18:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK5i6-0002Cg-MR for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:18:31 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5i6-0002Ca-FL for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:18:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZK5i4-00041N-Gg for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 16:18:24 +0200 Original-Received: from ip-90-187-191-46.web.vodafone.de ([90.187.191.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2015 16:18:24 +0200 Original-Received: from michael_heerdegen by ip-90-187-191-46.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2015 16:18:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-187-191-46.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:MDkZap9EFzlcFOrAkxyB1bc3uTg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106067 Archived-At: Dmitry Gutov writes: > On 07/28/2015 04:24 PM, Martin Barth wrote: > > > Making completion list... > > `find-grep' is an alias for `grep-find' > > find-library-name: Can't find library > > /usr/share/emacs/24.3/lisp/progmodes/grep.el > > No idea what's going on there. Maybe he doesn't have the el sources installed at his OS? Here is the definition: --8<---------------cut here---------------start------------->8--- (defun grep-find (command-args) "Run grep via find, with user-specified args COMMAND-ARGS. Collect output in a buffer. While find runs asynchronously, you can use the \\[next-error] command to find the text that grep hits refer to. This command uses a special history list for its arguments, so you can easily repeat a find command." (interactive (progn (grep-compute-defaults) (if grep-find-command (list (read-shell-command "Run find (like this): " grep-find-command 'grep-find-history)) ;; No default was set (read-string "compile.el: No `grep-find-command' command available. Press RET.") (list nil)))) (when command-args (let ((null-device nil)) ; see grep (grep command-args)))) --8<---------------cut here---------------end--------------->8--- > > so with googling a bit i found out that there is a grep-find-command > > variable that you can modify This can not be set directly because it has a :set spec in the defcustom. > I wouldn't call this a good solution for your problem. Now you can > grep in an arbitrary directory at all. > > Further, you'll break other commands that use grep-find-command, now > or in the future. Indeed. Michael.