From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: locate-with-filter Date: Sun, 12 Mar 2006 17:59:14 -0600 (CST) Message-ID: <200603122359.k2CNxE111892@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1142208593 7032 80.91.229.2 (13 Mar 2006 00:09:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Mar 2006 00:09:53 +0000 (UTC) Cc: Peter Breton , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 13 01:09:47 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FIaYN-0007Oc-1V for ged-emacs-devel@m.gmane.org; Mon, 13 Mar 2006 01:04:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIaYM-0003fh-LN for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2006 19:04:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FIaYB-0003fA-7i for emacs-devel@gnu.org; Sun, 12 Mar 2006 19:04:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FIaYA-0003ey-L7 for emacs-devel@gnu.org; Sun, 12 Mar 2006 19:04:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIaYA-0003ev-JJ for emacs-devel@gnu.org; Sun, 12 Mar 2006 19:04:38 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FIabx-0005Mj-Pk; Sun, 12 Mar 2006 19:08:33 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id k2D04Q8t010756; Sun, 12 Mar 2006 18:04:26 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id k2CNxE111892; Sun, 12 Mar 2006 17:59:14 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Sat, 11 Mar 2006 18:46:49 -0500) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Sun, 12 Mar 2006 18:04:27 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51538 Archived-At: Richard Stallman wrote: The doc string of locate-with-filter is not clear at all. Can someone make it clearer? I have no problem understanding it myself, so I do not know what the exact problem is. However, does the patch below make it clearer? The other changes in the patch are meant to distinguish more clearly between the external locate program and the Emacs locate command, remove a confusing self-referential link in the locate docstring and replace an alias for `keep-lines' by the current name. I can install if desired. ===File ~/locate-diff======================================= *** locate.el 06 Feb 2006 16:01:50 -0600 1.35 --- locate.el 12 Mar 2006 17:45:59 -0600 *************** *** 190,196 **** ;;;###autoload (defun locate (search-string &optional filter) ! "Run the program `locate', putting results in `*Locate*' buffer. With prefix arg, prompt for the locate command to run." (interactive (list --- 190,196 ---- ;;;###autoload (defun locate (search-string &optional filter) ! "Run the locate program, putting results in `*Locate*' buffer. With prefix arg, prompt for the locate command to run." (interactive (list *************** *** 255,264 **** ;;;###autoload (defun locate-with-filter (search-string filter) ! "Run the locate command with a filter. ! The filter is a regular expression. Only results matching the filter are ! shown; this is often useful to constrain a big search." (interactive (list (read-from-minibuffer "Locate: " nil nil nil 'locate-history-list) --- 255,265 ---- ;;;###autoload (defun locate-with-filter (search-string filter) ! "Run the locate program with a filter. ! FILTER is a regular expression. Only the lines in the output of ! the locate program that contain a match for FILTER are shown in ! the `*Locate*' buffer; this is often useful to constrain a big search." (interactive (list (read-from-minibuffer "Locate: " nil nil nil 'locate-history-list) *************** *** 269,275 **** (defun locate-filter-output (filter) "Filter output from the locate command." (goto-char (point-min)) ! (delete-non-matching-lines filter)) (defvar locate-mode-map nil "Local keymap for Locate mode buffers.") --- 270,276 ---- (defun locate-filter-output (filter) "Filter output from the locate command." (goto-char (point-min)) ! (keep-lines filter)) (defvar locate-mode-map nil "Local keymap for Locate mode buffers.") ============================================================