GNU bug report logs - #64543
[PATCH] package-report-bug: don't fail on custom groups defined by eval

Previous Next

Package: emacs;

Reported by: sbaugh <at> catern.com

Date: Sun, 9 Jul 2023 17:09:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: sbaugh <at> catern.com, 64543 <at> debbugs.gnu.org
Subject: Re: bug#64543: [PATCH] package-report-bug: don't fail on custom
 groups defined by eval
Date: Wed, 12 Jul 2023 15:56:44 -0400
[Message part 1 (text/plain, inline)]
Philip Kaludercic <philipk <at> posteo.net> writes:

> sbaugh <at> catern.com writes:
>> Good point.  I was just copying the last condition in the and.  Lifted
>> them both out of the loop:
>>
>> From 2873d4c482acfd1ced749d593fd512c408e0a578 Mon Sep 17 00:00:00 2001
>> From: Spencer Baugh <sbaugh <at> catern.com>
>> Date: Sun, 9 Jul 2023 22:21:03 -0400
>> Subject: [PATCH] Support transforming the dirname used by uniquify
>
> Wrong patch?
Oops! Here's the right one:

[0001-package-report-bug-don-t-fail-on-custom-groups-defin.patch (text/x-patch, inline)]
From fb31777bcc1935de351eaa35c1ed679c66d24a92 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh <at> catern.com>
Date: Sun, 9 Jul 2023 12:59:50 -0400
Subject: [PATCH] package-report-bug: don't fail on custom groups defined by
 eval

Previously we just assumed that the car of an element of
custom-current-group-alist was a filename.  But actually it can be nil
if a custom group was defined by just evaling Lisp.

* lisp/emacs-lisp/package.el (package-report-bug): Don't fail when a
custom group was defined by eval.
---
 lisp/emacs-lisp/package.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 3e6acd9b388..58ca19f7fe2 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -4637,13 +4637,14 @@ package-report-bug
         vars)
     (dolist-with-progress-reporter (group custom-current-group-alist)
         "Scanning for modified user options..."
-      (dolist (ent (get (cdr group) 'custom-group))
-        (when (and (custom-variable-p (car ent))
-                   (boundp (car ent))
-                   (not (eq (custom--standard-value (car ent))
-                            (default-toplevel-value (car ent))))
-                   (file-in-directory-p (car group) (package-desc-dir desc)))
-          (push (car ent) vars))))
+      (when (and (car group)
+                 (file-in-directory-p (car group) (package-desc-dir desc)))
+        (dolist (ent (get (cdr group) 'custom-group))
+          (when (and (custom-variable-p (car ent))
+                     (boundp (car ent))
+                     (not (eq (custom--standard-value (car ent))
+                              (default-toplevel-value (car ent)))))
+            (push (car ent) vars)))))
     (dlet ((reporter-prompt-for-summary-p t))
       (reporter-submit-bug-report maint name vars))))
 
-- 
2.39.3


This bug report was last modified 1 year and 310 days ago.

Previous Next


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