From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: no way to stop find-grep-dired Date: Mon, 06 Oct 2003 10:47:30 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F819CA2.40606@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1065458914 7228 80.91.224.253 (6 Oct 2003 16:48:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2003 16:48:34 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 06 18:48:31 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A6YX8-0000WN-01 for ; Mon, 06 Oct 2003 18:48:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A6YWn-0006qJ-IU for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Oct 2003 12:48:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A6YWk-0006qD-QX for bug-gnu-emacs@prep.ai.mit.edu; Mon, 06 Oct 2003 12:48:06 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A6YWD-0006dU-VG for bug-gnu-emacs@prep.ai.mit.edu; Mon, 06 Oct 2003 12:48:05 -0400 Original-Received: from [193.4.58.12] (helo=horus.isnic.is) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1A6YWD-0006cr-Gt for bug-gnu-emacs@prep.ai.mit.edu; Mon, 06 Oct 2003 12:47:33 -0400 Original-Received: from mail.fu-berlin.de (root@mail.fu-berlin.de [160.45.11.165]) by horus.isnic.is (8.12.9/8.12.9/isnic) with ESMTP id h96GlU90027206 for ; Mon, 6 Oct 2003 16:47:30 GMT (envelope-from ihs_4664@yahoo.com) Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Mon, 6 Oct 2003 18:47:30 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Mon, 6 Oct 2003 18:47:29 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 58 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1065458849 16535265 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5916 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5916 Dan Jacobson wrote: > find-grep-dired's docstring should say how to interrupt it. > Apparently one does a kill-buffer, which takes with it all its > output so far. Better yet, a new command to do what you want (what would be a good local binding -- maybe C-k?): *** emacs-21.3/lisp/find-dired.el.orig Thu Dec 27 19:13:31 2001 --- emacs-21.3/lisp/find-dired.el Mon Oct 6 10:41:17 2003 *************** *** 101,110 **** (if (or (not (eq (process-status find) 'run)) (yes-or-no-p "A `find' process is running; kill it? ")) (condition-case nil ! (progn ! (interrupt-process find) ! (sit-for 1) ! (delete-process find)) (error nil)) (error "Cannot have two processes in `%s' at once" (buffer-name))))) --- 101,107 ---- (if (or (not (eq (process-status find) 'run)) (yes-or-no-p "A `find' process is running; kill it? ")) (condition-case nil ! (kill-find-dired find) (error nil)) (error "Cannot have two processes in `%s' at once" (buffer-name))))) *************** *** 150,155 **** --- 147,165 ---- (setq mode-line-process '(":%s")))) ;;;###autoload + (defun kill-find-dired (&optional process) + "Kill the PROCESS made by the \\[find-dired] command." + (interactive) + (or (and process + (equal (process-name process) find-dired-find-program)) + (setq process + (get-process find-dired-find-program)) + (error "No %s process" find-dired-find-program)) + (interrupt-process process) + (sit-for 1) + (delete-process process))) + + ;;;###autoload (defun find-name-dired (dir pattern) "Search DIR recursively for files matching the globbing pattern PATTERN, and run dired on those files. -- Kevin Rodgers