unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Christopher Thorne <c.thorne@reckondigital.com>
Cc: 34621@debbugs.gnu.org
Subject: bug#34621: [PATCH] Fix rgrep in dired taking default search file pattern from directory name (e.g. *.11 for django-1.11)
Date: Mon, 08 Apr 2019 22:44:20 +0300	[thread overview]
Message-ID: <87mul0wacr.fsf@mail.linkov.net> (raw)
In-Reply-To: <82347809b60dfc4e18a822d2d604475c@reckondigital.com> (Christopher Thorne's message of "Mon, 08 Apr 2019 11:41:20 +0100")

> I've updated the patch following input from Drew and Juri.
> This now adds 'grep-default-file-pattern-function' which major modes
> can implement.
> Dired implements this to take the extension of the file at point, with
> a default of 'all',
> thus solving the issue I was having with the django-1.11 directory
> mentioned earlier in the thread.
> Behaviour for major modes that don't implement
> 'grep-default-file-pattern-function' will remain as before.

Thanks, this is better than previous versions.

Even more, you don't need any changes in dired.el.  Just use in grep.el

  (run-hook-with-args-until-success 'file-name-at-point-functions)

because 'file-name-at-point-functions' already has the right value in Dired.

You can call it at the very beginning of grep-read-files in the same 'or'
before buffer-file-name, so the existing code will take care about getting
its file extension.





  reply	other threads:[~2019-04-08 19:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 17:29 bug#34621: [PATCH] lisp/progmodes/grep.el (grep-read-files): Add file-directory-p check Christopher Thorne
2019-03-04 11:13 ` bug#34621: Patch Update Christopher Thorne
2019-03-04 15:26   ` Drew Adams
2019-03-05 10:49     ` Christopher Thorne
2019-03-05 17:48       ` Drew Adams
2019-03-05 18:22         ` Christopher Thorne
2019-03-05 18:44           ` Drew Adams
2019-03-06 11:10             ` Christopher Thorne
2019-03-17 21:28               ` bug#34621: [PATCH] lisp/progmodes/grep.el (grep-read-files): Add file-directory-p check Juri Linkov
2019-04-08 10:41                 ` bug#34621: [PATCH] Fix rgrep in dired taking default search file pattern from directory name (e.g. *.11 for django-1.11) Christopher Thorne
2019-04-08 19:44                   ` Juri Linkov [this message]
2019-04-09 11:09                     ` Christopher Thorne
2019-04-09 11:52                       ` Noam Postavsky
2019-04-09 12:23                         ` Christopher Thorne
2019-04-09 14:18                           ` Eli Zaretskii
2019-04-09 14:32                             ` Christopher Thorne
2019-04-09 20:32                       ` Juri Linkov
2019-04-10 10:42                         ` Christopher Thorne
2019-04-10 20:37                           ` Juri Linkov
2019-04-11 20:51                             ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mul0wacr.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=34621@debbugs.gnu.org \
    --cc=c.thorne@reckondigital.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).