all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35121: [debbugs.el] debbugs-make-control-message doesn't always ask for version
@ 2019-04-03 13:20 Noam Postavsky
  2019-04-03 19:48 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Noam Postavsky @ 2019-04-03 13:20 UTC (permalink / raw)
  To: 35121

[-- 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-03 23:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-03 13:20 bug#35121: [debbugs.el] debbugs-make-control-message doesn't always ask for version Noam Postavsky
2019-04-03 19:48 ` Michael Albinus
2019-04-03 23:51   ` Noam Postavsky

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.