GNU bug report logs - #67018
[PATCH] Add autoload cookie to vc-git-grep

Previous Next

Package: emacs;

Reported by: Alyssa Ross <hi <at> alyssa.is>

Date: Thu, 9 Nov 2023 14:48:01 UTC

Severity: wishlist

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>, Alyssa Ross <hi <at> alyssa.is>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 67018 <at> debbugs.gnu.org
Subject: bug#67018: [PATCH] Add autoload cookie to vc-git-grep
Date: Thu, 9 Nov 2023 21:34:12 +0200
On 09/11/2023 17:13, Eli Zaretskii wrote:
>> From: Alyssa Ross<hi <at> alyssa.is>
>> Cc:67018 <at> debbugs.gnu.org
>> Date: Thu, 09 Nov 2023 16:05:32 +0100
>>
>> Eli Zaretskii<eliz <at> gnu.org>  writes:
>>
>>>> +;;;###autoload
>>>>   (defun vc-git-grep (regexp &optional files dir)
>>>>     "Run git grep, searching for REGEXP in FILES in directory DIR.
>>>>   The search is limited to file names matching shell pattern FILES.
>>> Thanks, but please explain the motivation.  Which package needs to
>>> autoload this function and why?
>> Often running M-x vc-git-grep is the first thing I do after starting
>> Emacs.  I think it would be good if it was autoloaded, so I didn't have
>> to M-x load-library vc-git first, or try to set up autoloading just for
>> myself in my Emacs configuration.
> By the same token we should autoload every command in every Lisp
> package we have?  Because there are a lot of commands that are not
> autoloaded, and you need to load their package to have them available.
> I wonder what Dmitry and Stefan (both of them) think about this.

A lot of commands don't make sense outside of major or minor mode, so we 
only have to autoload the modes in those cases.

If 'vc-git-grep' is an independent entry point, it should make sense to 
autoload it. I suppose vc-git is not loaded at the beginning of the 
session because no [Git-controlled] file has been visited yet.

I think I'd also like to advertise 'project-find-regexp' (bound to 'C-x 
p g'). Just in case Alyssa was not aware of it.




This bug report was last modified 1 year and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.