bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Wed, 06 Mar 2019 11:10:03 +0000
User-agent: Roundcube Webmail/1.1.2

Thanks for the input, Drew.

It's not obvious what a reasonable or smart default
filename pattern is in most cases.  Just because
your current buffer is visiting a file does not at
all imply that you want to search files with the
same extension.

I think you need to (for yourself) specify just
what relation (if any) you want between the current
buffer and the default filename pattern.

Personally I think the current behaviour of searching files with the same extension works quite well in most cases. There is also some flexibility with aliases which means that if you're in a "*.c" file the default pattern becomes "*.[ch]".

However, I like the idea of providing more flexibility like `grepp-default-regexp-fn`. This would mean a buffer in c-mode could always suggest *.[ch] regardless of its buffer/file name. More importantly, dired could implement this so that no default patterns are suggested for dired buffers.

I will consider both (1) using only buffer-file-name instead of buffer-name (2) enabling rgrep to delegate extension suggestions to major modes. (1) would fix the case I'm personally encountering with dired, but (2) may be better in the long term and could cover more cases that I'm currently imagining.





reply via email to

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