Subject: bug#44494: bug#2807: Subject: 23.0.90; etags can't access .el.gz files

From: Mauro Aranda <[email-masked]>
Date: Thu, 12 Oct 2023 09:39:19 -0300

My way of reproducing Bug#2807 is:

In emacs repo directory:
make tags
make install
emacs -Q

M-x visit-tags-table RET /path/to/where/installed/TAGS/ended-up
M-x tags-search RET tags-search

While it doesn't error out with:
`next-file: Opening input file: no such file or directory,

It says: All files processed
without finding tags-search.

Checking messages I see:

Scanning file /usr/local/share/emacs/30.0.50/lisp/cus-start.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/international/emoji.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/fontset.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/isearch-x.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-brackets.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-category.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-combining.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-comment.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-confusable.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-decimal.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-decomposition.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-digit.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-lowercase.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-mirrored.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-name.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-numeric.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-old-name.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-special-lowercase.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-special-titlecase.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-special-uppercase.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-titlecase.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/uni-uppercase.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/international/utf-7.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/org/ox-ascii.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/org/ob-matlab.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/mail/blessmail.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/loadup.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/leim/quail/ZOZY.el...
Scanning file /usr/local/share/emacs/30.0.50/lisp/leim/ja-dic/ja-dic.el...
Scanning file 
/usr/local/share/emacs/30.0.50/lisp/international/eucjp-ms.el...

Which says it's not scanning every file.  And something is off. It
couldn't be scanning cus-start.el, because I only have cus-start.elc and
cus-start.el.gz in that directory.  It seems to me that it's scanning
cus-load.el, which is not byte-compiled.  I think that the behavior
change with regards to the OP reproducer is:

commit df1dbaf121703aebae83d2725b7aed8b961f2913
Author: Dmitry Gutov <[email-masked]>
Date:   Fri Jul 30 14:58:25 2021 +0200

     Make fileloop skip missing files

     * lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
     skip to the next one (bug#44979).

For reproducing Bug#44494, I follow the same steps, but instead of
executing tags-search I do:
(require 'xref)
M-x xref-etags-mode
C-u M-. tags-search

And get:
user-error: Rerun etags: ‘^(defun tags-search ’ not found in 
/usr/local/share/emacs/30.0.50/lisp/progmodes/etags.el