From: Noam Postavsky <npostavs@gmail.com>
To: 35121@debbugs.gnu.org
Subject: bug#35121: [debbugs.el] debbugs-make-control-message doesn't always ask for version
Date: Wed, 03 Apr 2019 09:20:30 -0400 [thread overview]
Message-ID: <87h8bffco1.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1332 bytes --]
From fbaec0d15b816892c5f774ea9cfdfa6536956d8e Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@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
next reply other threads:[~2019-04-03 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 13:20 Noam Postavsky [this message]
2019-04-03 19:48 ` bug#35121: [debbugs.el] debbugs-make-control-message doesn't always ask for version Michael Albinus
2019-04-03 23:51 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8bffco1.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=35121@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.