From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Thorne Newsgroups: gmane.emacs.bugs Subject: bug#34621: Patch Update Date: Wed, 06 Mar 2019 11:10:03 +0000 Organization: Reckon Digital Message-ID: <80f4335be923e21fe782780c6812a03f@reckondigital.com> References: <08e7108149ce2374fd0c9b7fc3e6ae38@reckondigital.com> <40839b67-bce7-4a01-89f1-c14643b18b32@default> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="63726"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Roundcube Webmail/1.1.2 To: 34621@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 06 12:13:00 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1UTs-000GRU-3Z for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 12:13:00 +0100 Original-Received: from localhost ([127.0.0.1]:59376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1UTq-0000cm-Tr for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 06:12:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1US2-0007gI-4X for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 06:11:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1US0-0003oF-Gl for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 06:11:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1URy-0003nR-Qq for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 06:11:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1URy-0007wG-GC for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 06:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Thorne Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2019 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34621 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 34621-submit@debbugs.gnu.org id=B34621.155187060930439 (code B ref 34621); Wed, 06 Mar 2019 11:11:02 +0000 Original-Received: (at 34621) by debbugs.gnu.org; 6 Mar 2019 11:10:09 +0000 Original-Received: from localhost ([127.0.0.1]:33772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1UR6-0007uq-Ue for submit@debbugs.gnu.org; Wed, 06 Mar 2019 06:10:09 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:49429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1UR5-0007uf-24 for 34621@debbugs.gnu.org; Wed, 06 Mar 2019 06:10:08 -0500 Original-Received: from webmail.gandi.net (webmail11.sd4.0x35.net [10.200.201.11]) (Authenticated sender: c.thorne@reckondigital.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id 78035E0018; Wed, 6 Mar 2019 11:10:03 +0000 (UTC) In-Reply-To: <40839b67-bce7-4a01-89f1-c14643b18b32@default> X-Sender: c.thorne@reckondigital.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156092 Archived-At: 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.