Subject: bug#78851: 30.1.50; fileloop-continue should have autoload cookie

From: Eli Zaretskii <[email-masked]>
Date: Sat, 21 Jun 2025 17:28:08 +0300

> Cc: [email-masked]
> Date: Sat, 21 Jun 2025 17:22:40 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > >> This came up because I made a transient for project commands
> > >> and included project-search and wanted to include a way to
> > >> continue the search, but when running it I got the following error.
> > >> 
> > >>    transient-setup: Suffix command fileloop-continue is not
> > >>    defined or autoloaded
> > >> 
> > >> So I could add my own autoload for it but I don't think I
> > >> should have to.
> > > 
> > > Why not?  We will definitely not autoload every possible command in
> > > Emacs, so some of them will sometimes need a 'require' or an
> > > 'autoload'.
> > 
> > I thought I had given enough reasons above, but here's another:
> > tags-loop-continue was and still is autoloaded. I would expect
> > it's replacement to be treated the same way, particularly since it
> > has more uses.
> 
> Sorry, I'm not convinced.

Btw, I don't think I even understand your original situation, since
project-search does this:

  (defun project-search (regexp)
    "Search for REGEXP in all the files of the project.
  Stops when a match is found.
  To continue searching for the next match, use the
  command \\[fileloop-continue]."
    (interactive "sSearch (regexp): ")
    (fileloop-initialize-search
     regexp
     (project-files (project-current t))
     'default)
    (fileloop-continue))

and fileloop-initialize-search is autoloaded, so it ought to load
fileloop.el.  Thus, I cannot understand how come the following call to
fileloop-continue signaled an error.