From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#4210: 23.1.50; lgrep chooses silly default value for file extension Date: Sun, 23 Aug 2009 12:02:51 -0600 Message-ID: References: <87fxbnkyz2.fsf@debian.domain.actdsltmp> Reply-To: Kevin Rodgers , 4210@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251052034 15244 80.91.229.12 (23 Aug 2009 18:27:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Aug 2009 18:27:14 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 23 20:27:07 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MfHmU-0001Yk-Jq for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2009 20:27:07 +0200 Original-Received: from localhost ([127.0.0.1]:56480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfHmU-0004nF-0F for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2009 14:27:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfHmO-0004mO-VG for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:27:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfHmJ-0004jk-Od for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:26:59 -0400 Original-Received: from [199.232.76.173] (port=43143 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfHmJ-0004jW-El for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:26:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57934) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfHmI-0001Jy-N9 for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:26:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7NIQpnL012127; Sun, 23 Aug 2009 11:26:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7NIA6fq009022; Sun, 23 Aug 2009 11:10:06 -0700 Resent-Date: Sun, 23 Aug 2009 11:10:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kevin Rodgers Original-Sender: news Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 23 Aug 2009 18:10:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4210 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12510506057109 (code B ref -1); Sun, 23 Aug 2009 18:10:06 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2009 18:03:25 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7NI3Mda007106 for ; Sun, 23 Aug 2009 11:03:24 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfHPW-0000bJ-1S for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:03:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfHPR-0000VI-Nd for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:03:21 -0400 Original-Received: from [199.232.76.173] (port=44039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfHPR-0000Uy-GP for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:03:17 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41826) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfHPQ-0005kG-PP for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 14:03:17 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MfHPM-0001Q6-JM for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 20:03:12 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Aug 2009 20:03:12 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Aug 2009 20:03:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <87fxbnkyz2.fsf@debian.domain.actdsltmp> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 23 Aug 2009 14:26:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30502 gmane.emacs.pretest.bugs:24979 Archived-At: Eric Hanchrow wrote: > Please write in English if possible, because the Emacs maintainers > usually do not have translators to read other languages for them. > > Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. > > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: > > I visited a python file > > C-x C-f ~ / l o c TAB RET b i n RET . p y RET > > (I happen to have a bunch of python files in ~/local/bin, and I have > ido-mode turned on) > > I cloned the buffer: > > C-x 4 c > > I used lgrep to search: > > ESC x l g r e p RET ^ c l a s s RET RET RET > > > At this point I was looking at a *grep* buffer like this: > > -*- mode: grep; default-directory: "~/local/bin/" -*- > Grep started at Wed Aug 19 19:17:41 > > grep -i -nH -e \^class *.py<2> > /bin/bash: -c: line 0: syntax error near unexpected token `2' > /bin/bash: -c: line 0: `grep -i -nH -e \^class *.py<2>' > > Grep exited abnormally with code 2 at Wed Aug 19 19:17:41 > > Naturally the "grep" command should have been > > grep -i -nH -e \^class *.py > > i.e., the "<2>" shouldn't have been put in there. 2009-08-23 Kevin Rodgers * progmodes/grep.el (grep-read-files): Strip trailing from buffer names not visiting a file (e.g. cloned buffers). *** grep.el~ Sun Aug 23 11:51:39 2009 --- grep.el Sun Aug 23 11:52:37 2009 *************** *** 747,753 **** (defun grep-read-files (regexp) "Read files arg for interactive grep." ! (let* ((bn (or (buffer-file-name) (buffer-name))) (fn (and bn (stringp bn) (file-name-nondirectory bn))) --- 747,754 ---- (defun grep-read-files (regexp) "Read files arg for interactive grep." ! (let* ((bn (or (buffer-file-name) ! (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name)))) (fn (and bn (stringp bn) (file-name-nondirectory bn))) -- Kevin Rodgers Denver, Colorado, USA