GNU bug report logs - #35121
[debbugs.el] debbugs-make-control-message doesn't always ask for version

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Wed, 3 Apr 2019 13:21:02 UTC

Severity: minor

Tags: fixed, patch

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35121 in the body.
You can then email your comments to 35121 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35121; Package emacs. (Wed, 03 Apr 2019 13:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noam Postavsky <npostavs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 03 Apr 2019 13:21:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [debbugs.el] debbugs-make-control-message doesn't always ask for
 version
Date: Wed, 03 Apr 2019 09:20:30 -0400
[Message part 1 (text/plain, inline)]
Severity: minor
Tags: patch

When using debbugs-make-control-message to make a "done" or "fixed"
control message from a message-mode buffer, it doesn't ask for for a
version number.  That's because (debbugs-gnu-current-status) returns nil
outside the *Bugs* buffer, so the (member "emacs" (cdr (assq 'package
status))) check always fails.

I think it should be okay to fallback to cache, or debbugs-get-status if
the cache is empty, right?

By the way, I wonder if we should ask for version even if the package is
not Emacs (obviously the initial-input suggestion only works for Emacs),
surely other packages have versions too?

[v1-0001-Try-harder-to-debbugs-status-if-d-g-current-statu.patch (text/x-diff, inline)]
From fbaec0d15b816892c5f774ea9cfdfa6536956d8e Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> users.sourceforge.net>
Date: Wed, 3 Apr 2019 09:03:13 -0400
Subject: [PATCH v1] Try harder to debbugs status if d-g-current-status missing

* packages/debbugs/debbugs-gnu.el (debbugs-gnu-make-control-message):
Fallback to debbugs-cache-data or debbugs-get-status if
debbugs-gnu-current-status returns nil, otherwise we fail to ask for
version number when fixing/finding/closing/etc Emacs bugs from a
message-mode buffer.
---
 packages/debbugs/debbugs-gnu.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 33860c2d5..8f914d5c1 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1586,7 +1586,9 @@ (defun debbugs-gnu-make-control-message (message bugid &optional reverse buffer)
            current-prefix-arg
            (when (derived-mode-p 'message-mode)
              (current-buffer)))))
-  (let* ((status (debbugs-gnu-current-status))
+  (let* ((status (or (debbugs-gnu-current-status)
+                     (gethash bugid debbugs-cache-data)
+                     (debbugs-get-status bugid)))
          (version
           (if (and
                (member message '("close" "done"
-- 
2.11.0


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35121; Package emacs. (Wed, 03 Apr 2019 19:49:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 35121 <at> debbugs.gnu.org
Subject: Re: bug#35121: [debbugs.el] debbugs-make-control-message doesn't
 always ask for version
Date: Wed, 03 Apr 2019 21:48:17 +0200
Noam Postavsky <npostavs <at> gmail.com> writes:

Hi Noam,

> When using debbugs-make-control-message to make a "done" or "fixed"
> control message from a message-mode buffer, it doesn't ask for for a
> version number.  That's because (debbugs-gnu-current-status) returns nil
> outside the *Bugs* buffer, so the (member "emacs" (cdr (assq 'package
> status))) check always fails.
>
> I think it should be okay to fallback to cache, or debbugs-get-status if
> the cache is empty, right?

Yes. Your patch LGTM.

> By the way, I wonder if we should ask for version even if the package is
> not Emacs (obviously the initial-input suggestion only works for Emacs),
> surely other packages have versions too?

I would suppose so. But in order to get feedback, you might ask on the
<help-debbugs <at> gnu.org> ML. People using debbugs.el for other projects
but Emacs are lurking there.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35121; Package emacs. (Wed, 03 Apr 2019 23:52:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 35121 <at> debbugs.gnu.org
Subject: Re: bug#35121: [debbugs.el] debbugs-make-control-message doesn't
 always ask for version
Date: Wed, 03 Apr 2019 19:51:23 -0400
tags 35121 fixed
close 35121 
quit

Michael Albinus <michael.albinus <at> gmx.de> writes:

>> I think it should be okay to fallback to cache, or debbugs-get-status if
>> the cache is empty, right?
>
> Yes. Your patch LGTM.

Pushed.

[1: 1a6a4a33a]: 2019-04-03 19:46:11 -0400
  Search further if d-g-cur-status is nil (Bug#35121)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1a6a4a33a0933152d21e4da5ba052704bd292aec>


>> By the way, I wonder if we should ask for version even if the package is
>> not Emacs (obviously the initial-input suggestion only works for Emacs),
>> surely other packages have versions too?
>
> I would suppose so. But in order to get feedback, you might ask on the
> <help-debbugs <at> gnu.org> ML. People using debbugs.el for other projects
> but Emacs are lurking there.

Okay, I've sent a message, we'll see if anyone bites.





Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 03 Apr 2019 23:52:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 35121 <at> debbugs.gnu.org and Noam Postavsky <npostavs <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 03 Apr 2019 23:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 69 days ago.

Previous Next


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