unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
@ 2023-11-09 14:46 Alyssa Ross
  2023-11-09 14:59 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Alyssa Ross @ 2023-11-09 14:46 UTC (permalink / raw)
  To: 67018

---
 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






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-11-09 14:59 UTC (permalink / raw)
  To: Alyssa Ross; +Cc: 67018

> From: Alyssa Ross <hi@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-11-09 14:59 ` Eli Zaretskii
@ 2023-11-09 15:05   ` Alyssa Ross
  2023-11-09 15:13     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Alyssa Ross @ 2023-11-09 15:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 67018

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alyssa Ross <hi@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-11-09 15:05   ` Alyssa Ross
@ 2023-11-09 15:13     ` Eli Zaretskii
  2023-11-09 19:34       ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-11-09 15:13 UTC (permalink / raw)
  To: Alyssa Ross, Stefan Monnier; +Cc: 67018

> 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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-11-09 15:13     ` Eli Zaretskii
@ 2023-11-09 19:34       ` Dmitry Gutov
  2023-12-24 14:47         ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2023-11-09 19:34 UTC (permalink / raw)
  To: Eli Zaretskii, Alyssa Ross, Stefan Monnier; +Cc: 67018

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-11-09 19:34       ` Dmitry Gutov
@ 2023-12-24 14:47         ` Stefan Kangas
  2023-12-24 16:37           ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2023-12-24 14:47 UTC (permalink / raw)
  To: Dmitry Gutov, Eli Zaretskii, Alyssa Ross, Stefan Monnier; +Cc: 67018

Dmitry Gutov <dmitry@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-12-24 14:47         ` Stefan Kangas
@ 2023-12-24 16:37           ` Dmitry Gutov
  2024-01-11 21:17             ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2023-12-24 16:37 UTC (permalink / raw)
  To: Stefan Kangas, Eli Zaretskii, Alyssa Ross, Stefan Monnier; +Cc: 67018

On 24/12/2023 16:47, Stefan Kangas wrote:
> Dmitry Gutov<dmitry@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#67018: [PATCH] Add autoload cookie to vc-git-grep
  2023-12-24 16:37           ` Dmitry Gutov
@ 2024-01-11 21:17             ` Stefan Kangas
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2024-01-11 21:17 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Eli Zaretskii, 67018-done, Alyssa Ross, Stefan Monnier

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 24/12/2023 16:47, Stefan Kangas wrote:
>> Dmitry Gutov<dmitry@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-11 21:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-12-24 14:47         ` Stefan Kangas
2023-12-24 16:37           ` Dmitry Gutov
2024-01-11 21:17             ` Stefan Kangas

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).