summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-05-23 10:59:34 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-05-23 10:59:34 -0700
commit73f4786d9315c5e40e88f8f34fb221ba4fbe5355 (patch)
tree263a313a228cbe01ce6cce87f4174226ba962a51
parent28b889404a73093ace55868e28fa41cdb5d4a3fb (diff)
downloadmailscripts-73f4786d9315c5e40e88f8f34fb221ba4fbe5355.tar.gz
notmuch-slurp-this-debbug: if fail to extract bug number, prompt
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog2
-rw-r--r--mailscripts.el6
2 files changed, 6 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 6565a39..a38fe6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ mailscripts (0.20-2) UNRELEASED; urgency=medium
* mailscripts.el:
- new command: notmuch-slurp-debbug-at-point
+ - notmuch-slurp-this-debbug: if fail to extract bug number from
+ subject line, prompt user for one
-- Sean Whitton <spwhitton@spwhitton.name> Sat, 23 May 2020 10:49:57 -0700
diff --git a/mailscripts.el b/mailscripts.el
index 3e5b3b5..36f5732 100644
--- a/mailscripts.el
+++ b/mailscripts.el
@@ -71,8 +71,10 @@ If NO-OPEN, don't open the thread."
"When viewing a Debian bug in notmuch, download any missing messages."
(interactive)
(let ((subject (notmuch-show-get-subject)))
- (when (string-match "Bug#\\([0-9]+\\):" subject)
- (notmuch-slurp-debbug (match-string 1 subject) t))
+ (notmuch-slurp-debbug
+ (if (string-match "Bug#\\([0-9]+\\):" subject)
+ (match-string 1 subject)
+ (read-string "Bug number: ")) t)
(notmuch-refresh-this-buffer)))
;;;###autoload