From: Federico Tedin <federicotedin@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 32549@debbugs.gnu.org
Subject: bug#32549: Allow passing custom options to vc-git-grep
Date: Tue, 28 Aug 2018 20:01:33 -0300 [thread overview]
Message-ID: <CAA8GjPkTDH3oN8u7ZZ9dFwv1qNrM+68wh+dqKrMAB+MhdKB0rw@mail.gmail.com> (raw)
In-Reply-To: <87r2ijtaeu.fsf@gmail.com>
> > I'm wondering how I would set my custom arguments when the vc-git-grep
> > function is called from another function. For example, the projectile
> > package defines projectile-grep, which eventually calls rgrep or
> > vc-git-grep [1] (depending on the user's choice).
>
> It looks like you'd have to do
>
> (let ((current-prefix-arg '(4)))
> (vc-git-grep ...))
I've set the prefix argument using the current-prefix-arg variable as
you mentioned:
(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).
Is there any way to set a default set of arguments in order to avoid typing them
when invoking the function?
next prev parent reply other threads:[~2018-08-28 23:01 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 [this message]
2018-08-28 23:14 ` Noam Postavsky
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA8GjPkTDH3oN8u7ZZ9dFwv1qNrM+68wh+dqKrMAB+MhdKB0rw@mail.gmail.com \
--to=federicotedin@gmail.com \
--cc=32549@debbugs.gnu.org \
--cc=npostavs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.