GNU bug report logs -
#67018
[PATCH] Add autoload cookie to vc-git-grep
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67018 in the body.
You can then email your comments to 67018 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 09 Nov 2023 14:48:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alyssa Ross <hi <at> alyssa.is>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 09 Nov 2023 14:48:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
---
lisp/vc/vc-git.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 707fc7cfc07..fe48d5fbd3d 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1930,6 +1930,7 @@ vc-git-prepare-patch
(defvar compilation-environment)
;; Derived from `lgrep'.
+;;;###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.
base-commit: 5d171d26c00aefaef1496dede69337946a1edb14
--
2.42.0
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 09 Nov 2023 15:00:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 67018 <at> debbugs.gnu.org (full text, mbox):
> From: Alyssa Ross <hi <at> alyssa.is>
> Date: Thu, 9 Nov 2023 15:46:30 +0100
>
> ---
> lisp/vc/vc-git.el | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index 707fc7cfc07..fe48d5fbd3d 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -1930,6 +1930,7 @@ vc-git-prepare-patch
> (defvar compilation-environment)
>
> ;; Derived from `lgrep'.
> +;;;###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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 09 Nov 2023 15:07:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 67018 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Alyssa Ross <hi <at> alyssa.is>
>> Date: Thu, 9 Nov 2023 15:46:30 +0100
>>
>> ---
>> lisp/vc/vc-git.el | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
>> index 707fc7cfc07..fe48d5fbd3d 100644
>> --- a/lisp/vc/vc-git.el
>> +++ b/lisp/vc/vc-git.el
>> @@ -1930,6 +1930,7 @@ vc-git-prepare-patch
>> (defvar compilation-environment)
>>
>> ;; Derived from `lgrep'.
>> +;;;###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.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 09 Nov 2023 15:15:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 67018 <at> debbugs.gnu.org (full text, mbox):
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 09 Nov 2023 19:36:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 67018 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Sun, 24 Dec 2023 14:48:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 67018 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dmitry <at> gutov.dev> writes:
> 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.
Makes sense to me. So should we install this change?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Sun, 24 Dec 2023 16:38:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 67018 <at> debbugs.gnu.org (full text, mbox):
On 24/12/2023 16:47, Stefan Kangas wrote:
> Dmitry Gutov<dmitry <at> gutov.dev> writes:
>
>> 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.
> Makes sense to me. So should we install this change?
My opinion is yes, in case that wasn't clear from the previous message.
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Jan 2024 17:51:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 30.1, send any further explanations to
67018 <at> debbugs.gnu.org and Alyssa Ross <hi <at> alyssa.is>
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 11 Jan 2024 21:19:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67018
; Package
emacs
.
(Thu, 11 Jan 2024 21:19:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 67018-done <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dmitry <at> gutov.dev> writes:
> On 24/12/2023 16:47, Stefan Kangas wrote:
>> Dmitry Gutov<dmitry <at> gutov.dev> writes:
>>
>>> 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.
>> Makes sense to me. So should we install this change?
>
> My opinion is yes, in case that wasn't clear from the previous message.
Now done (commit e4e89e2cb66). Thanks for the patch, Alyssa.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Feb 2024 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.