GNU bug report logs - #77083
31.0.50; submit-emacs-patch doesn't work in compressed lisp files

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Mon, 17 Mar 2025 20:38:02 UTC

Severity: normal

Found in version 31.0.50

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 77083 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Elijah Gabe Pérez <eg642616 <at> gmail.com>,
 77083 <at> debbugs.gnu.org
Subject: Re: bug#77083: 31.0.50; submit-emacs-patch doesn't work in
 compressed lisp files
Date: Tue, 18 Mar 2025 17:53:39 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
>> Date: Mon, 17 Mar 2025 14:37:04 -0600
>> 
>> When Emacs was compiled with compress-install, using submit-emacs-patch gives an error because it
>> search for maintainer address in file.el instead file.el.gz. 
>
> Thanks, but this lacks details, IMO.  AFAIU, submit-emacs-patch gleans
> source file names from the patch file you are about to submit, and it
> expands each file name in the patch against source-directory, before
> looking them up for their maintainers.  In the source tree (if you
> still have it around) the files are not compressed.  OTOH, if your
> patch names files by their absolute file name (in which case
> source-directory is not used), and the files are compressed in the
> installation tree, then how did you produce the patch from compressed
> files in the first place in a way that names the files without the .gz
> extensions?
>
> IOW, please show an example of a patch that could be used to reproduce
> this issue and the recipe to reproduce, and please tell whether you do
> or don't have the Emacs source tree pointed to by source-directory.
> Or maybe I'm missing something obvious, in which case please point out
> what I missed.

I would also be interested in the specific error being raised.  It might
be that the following check could suffice to fix the issue:

[Message part 2 (text/plain, inline)]
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index babfd2e68ae..ad6f1b7a58b 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -543,10 +543,11 @@ submit-emacs-patch
                  (with-temp-buffer
                    (insert-file-contents file)
                    (while (search-forward-regexp "^\\+\\{3\\} ./\\(.*\\)" nil t)
-                     (push (expand-file-name
-                            (match-string-no-properties 1)
-                            source-directory)
-                           files)))
+                     (let ((file (expand-file-name
+                                  (match-string-no-properties 1)
+                                  source-directory)))
+                       (when (file-readable-p file)
+                         (push file files)))))
                  (mapcan
                   (lambda (patch)
                     (seq-remove
[Message part 3 (text/plain, inline)]

> Thanks.
>
> P.S. I added Philip to the discussion, since he made the relevant
> change in emacsbug.el.

This bug report was last modified 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.