From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Federico Tedin Newsgroups: gmane.emacs.bugs Subject: bug#32549: Allow passing custom options to vc-git-grep Date: Tue, 28 Aug 2018 20:31:25 -0300 Message-ID: References: <875zzvv1kd.fsf@gmail.com> <87r2ijtaeu.fsf@gmail.com> <8736uyt767.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1535499008 31852 195.159.176.226 (28 Aug 2018 23:30:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 23:30:08 +0000 (UTC) Cc: 32549@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 29 01:30:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1funQy-0008Ag-3w for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Aug 2018 01:30:04 +0200 Original-Received: from localhost ([::1]:40456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1funT4-0007uR-Dz for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Aug 2018 19:32:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1funSy-0007uI-Bf for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 19:32:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1funSt-0007Fv-EX for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 19:32:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1funSs-0007F9-Jd for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 19:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1funSs-0003cF-BL for bug-gnu-emacs@gnu.org; Tue, 28 Aug 2018 19:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Federico Tedin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Aug 2018 23:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32549 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32549-submit@debbugs.gnu.org id=B32549.153549910613875 (code B ref 32549); Tue, 28 Aug 2018 23:32:02 +0000 Original-Received: (at 32549) by debbugs.gnu.org; 28 Aug 2018 23:31:46 +0000 Original-Received: from localhost ([127.0.0.1]:36190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1funSa-0003bg-DA for submit@debbugs.gnu.org; Tue, 28 Aug 2018 19:31:44 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:36842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1funSY-0003bT-V3 for 32549@debbugs.gnu.org; Tue, 28 Aug 2018 19:31:43 -0400 Original-Received: by mail-io0-f178.google.com with SMTP id q5-v6so2944521iop.3 for <32549@debbugs.gnu.org>; Tue, 28 Aug 2018 16:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o6IgZjhm34RyB2UdBaONQz6hGTdCCsfxDojlRWs2Ooo=; b=tc0wPxC9x8eD0Onplh+hMtTuk1qhvUlRyyAzHWXufQv/zz3TopFQxHIp9IIoSYUc5k UWBrH6IqprMXDERAvs7JlsbYf3MXVzARaPkjnu4yBLNhWv/MHt6H12uqF+OtvKjrKJQK dF7h37Ds6Xt4r8m6oY6FKZWJTqMqMivpRHpaNSxREywzBGoXJ2I7VSySX0BqwaQzfIul A3JT/03rHGI1aIJ+zdUafiTiUxNWq8mWkFiT0L8KO1NkCIZ6EfPsK7RvuwxBGajNtFoz OtiX5doy6Xx+m5Eqwv8n4iWUQUYc74sF/aiR7gk2AikNVCvcOslVhNRowtWMKJNAbW5Z BOfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o6IgZjhm34RyB2UdBaONQz6hGTdCCsfxDojlRWs2Ooo=; b=AUIjpUmWxY/bYYnB/FdVmaUZQpcvzrbkzsSVTrL6SKdguSkZUgfgkFQj+Vo/jSzl+L 5PZVuv+qHw/C7ara8fz8Zfdoa5PQZT5JIwNEaYanPXsHVmnYqVjTKXicPxSgYp40KEMq ZT/Ba5i6k3gLbPZbpCSrWs32V/gsZK+9mJx9Lp92sgMpies0P8lze6es8SwA/YH4mNqj ZsGQudEliWYQ/fFCt0hqIGCcrqeZyRML0rrh9eu2Y5w1xU0OPCj0bWJh4IHKPYj7ZwYC MF64ngLl4EAr+bOgm6g9gazKrFgRlxPHHTi0sZA+Earxzkr2xkZEXx4rLd+JoJEtevLu sd0A== X-Gm-Message-State: APzg51CjZ6h+732sucw4q0Tx8+7gbeeMLbEhdIMOnkMU5fbSuTex12wd dearmsdsZdZrNQL7wuaIlG8sv6JuXO/TmqFp5Kg= X-Google-Smtp-Source: ANB0VdYcrNhIlqMO2tSPO6sylLfSeTaWSqZ+SQHafqL/wPnTZ3DJND0jRuDqXDVPCfIrhQ6WUnzjBqgBU3VtlVCZEMk= X-Received: by 2002:a6b:b44e:: with SMTP id d75-v6mr3384959iof.63.1535499097490; Tue, 28 Aug 2018 16:31:37 -0700 (PDT) In-Reply-To: <8736uyt767.fsf@gmail.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: 208.118.235.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:149821 Archived-At: > 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)) My mistake. Calling projectile-grep with current-prefix-arg '(4) indeed prompts for the git-grep command _and_ a regexp. > > 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. I am sorry if I wasn't clear enough. What I'm trying to say is, when calling vc-git-grep directly or indirectly with current-prefix-arg '(4), I am always prompted for the full git-grep command. I would like to skip this step completely, and always use a custom set of arguments (like, for example, "-C 3"). Then, I would be prompted for a regexp and (maybe) files, which would be added to this custom git-grep command's arguments (this is how the rgrep command works, I think).