GNU bug report logs - #4210
23.1.50; lgrep chooses silly default value for file extension

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Thu, 20 Aug 2009 20:35:08 UTC

Severity: normal

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: 4210 <at> debbugs.gnu.org
Subject: bug#4210: patch
Date: Fri, 21 Aug 2009 07:09:07 -0700
This fixes it for me:

commit cbe538a4b0c80348b3a43b2a16c7d9cca1177b97
Author: Eric Hanchrow <erich <at> cozi.com>
Date:   Wed Aug 19 22:28:31 2009 -0700

    grep-read-files: consult (buffer-name (buffer-base-buffer)), not
just (buffer-name).

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 9e63c1d..a1a89d0 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -747,7 +747,7 @@ substitution string.  Note dynamic scoping of variables.")

 (defun grep-read-files (regexp)
   "Read files arg for interactive grep."
-  (let* ((bn (or (buffer-file-name) (buffer-name)))
+  (let* ((bn (or (buffer-file-name) (buffer-name (buffer-base-buffer))))
 	 (fn (and bn
 		  (stringp bn)
 		  (file-name-nondirectory bn)))



This bug report was last modified 15 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.