unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Federico Tedin <federicotedin@gmail.com>
Cc: 32549@debbugs.gnu.org
Subject: bug#32549: Allow passing custom options to vc-git-grep
Date: Tue, 28 Aug 2018 19:14:56 -0400	[thread overview]
Message-ID: <8736uyt767.fsf@gmail.com> (raw)
In-Reply-To: <CAA8GjPkTDH3oN8u7ZZ9dFwv1qNrM+68wh+dqKrMAB+MhdKB0rw@mail.gmail.com> (Federico Tedin's message of "Tue, 28 Aug 2018 20:01:33 -0300")

Federico Tedin <federicotedin@gmail.com> writes:

> (let ((current-prefix-arg '(4)))
>   (vc-git-grep "something" "*.el" "."))
>
> And then I also tried:
>
> (let ((current-prefix-arg '(4)))
>   (projectile-grep))
>
> In both cases, I am prompted for the full git-grep command (and
> nothing else).

Doesn't projectile-grep prompt you for a regexp?  I don't have it
installed here, but it looks like you have to pass a non-nil ARG to get
prompted for filenames, i.e.,

  (let ((current-prefix-arg '(4)))
    (projectile-grep nil t))

> Is there any way to set a default set of arguments in order to avoid
> typing them when invoking the function?

Not sure I follow, when you pass "something" and "*.el" to the function,
those get inserted into the default command so you don't have to type
them interactively.






  reply	other threads:[~2018-08-28 23:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27 23:03 bug#32549: Allow passing custom options to vc-git-grep Federico Tedin
2018-08-27 23:20 ` Noam Postavsky
2018-08-28  2:55   ` Federico Tedin
2018-08-28  3:52     ` Noam Postavsky
2018-08-28 23:01       ` Federico Tedin
2018-08-28 23:14         ` Noam Postavsky [this message]
2018-08-28 23:31           ` Federico Tedin
2018-08-29  0:45             ` Noam Postavsky
2018-08-29  0:54               ` Federico Tedin
2018-09-01 21:55                 ` Federico Tedin
2018-09-04 23:03                   ` Noam Postavsky

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=8736uyt767.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=32549@debbugs.gnu.org \
    --cc=federicotedin@gmail.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).