From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>, Alyssa Ross <hi@alyssa.is>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 67018@debbugs.gnu.org
Subject: bug#67018: [PATCH] Add autoload cookie to vc-git-grep
Date: Thu, 9 Nov 2023 21:34:12 +0200 [thread overview]
Message-ID: <de14d39c-b872-f4fe-d060-05322b51732f@gutov.dev> (raw)
In-Reply-To: <83msvnyn66.fsf@gnu.org>
On 09/11/2023 17:13, Eli Zaretskii wrote:
>> From: Alyssa Ross<hi@alyssa.is>
>> Cc:67018@debbugs.gnu.org
>> Date: Thu, 09 Nov 2023 16:05:32 +0100
>>
>> Eli Zaretskii<eliz@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.
next prev parent reply other threads:[~2023-11-09 19:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 14:46 bug#67018: [PATCH] Add autoload cookie to vc-git-grep Alyssa Ross
2023-11-09 14:59 ` Eli Zaretskii
2023-11-09 15:05 ` Alyssa Ross
2023-11-09 15:13 ` Eli Zaretskii
2023-11-09 19:34 ` Dmitry Gutov [this message]
2023-12-24 14:47 ` Stefan Kangas
2023-12-24 16:37 ` Dmitry Gutov
2024-01-11 21:17 ` Stefan Kangas
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=de14d39c-b872-f4fe-d060-05322b51732f@gutov.dev \
--to=dmitry@gutov.dev \
--cc=67018@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=hi@alyssa.is \
--cc=monnier@iro.umontreal.ca \
/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).