[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34621: Patch Update

From: Christopher Thorne
Subject: bug#34621: Patch Update
Date: Mon, 04 Mar 2019 11:13:07 +0000
User-agent: Roundcube Webmail/1.1.2

I've changed the patch to check if the buffer is in dired mode. I think this makes more sense than looking at the file system and addresses the edge case described in the previous email.

Also, I think I could have been clearer in explaining how to reproduce:
1. Create directory called django-1.11 on the filesystem
2. Open this directory in dired buffer
3. Run rgrep with this dired buffer open
4. Search for any string
5. Observe unexpected default extension suggestion of (*.11)

Patch below:

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 3fd2a7e701..22e7ec11d8 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -963,6 +963,7 @@ grep-read-files
                  (file-name-nondirectory bn)))
           (and fn
+               (not (eq major-mode 'dired-mode))
                (let ((aliases (remove (assoc "all" grep-files-aliases)
@@ -979,6 +980,7 @@ grep-read-files
                  (cdr alias))))
           (and fn
+               (not (eq major-mode 'dired-mode))
                (let ((ext (file-name-extension fn)))
                  (and ext (concat "*." ext)))))

Changelog entry:
* lisp/progmodes/grep.el (grep-read-files): Disable default extension in dired buffers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]