From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: bug-gnu-emacs@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: bug#4210: 23.1.50; lgrep chooses silly default value for file extension
Date: Sun, 23 Aug 2009 12:02:51 -0600 [thread overview]
Message-ID: <h6s08a$b5j$1@ger.gmane.org> (raw)
In-Reply-To: <87fxbnkyz2.fsf@debian.domain.actdsltmp>
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 <kevin.d.rodgers@gmail.com>
* progmodes/grep.el (grep-read-files): Strip trailing <N> 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
next prev parent reply other threads:[~2009-08-23 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87my5g50et.fsf@mail.jurta.org>
2009-08-20 2:20 ` bug#4210: 23.1.50; lgrep chooses silly default value for file extension Eric Hanchrow
2009-08-23 18:02 ` Kevin Rodgers [this message]
2009-08-30 23:55 ` bug#4210: marked as done (23.1.50; lgrep chooses silly default value for file extension) Emacs bug Tracking System
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='h6s08a$b5j$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=4210@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.