diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-23 11:07:19 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-23 11:07:19 -0700 |
commit | ce481dee7327c6ee4809370658009ee29994adcb (patch) | |
tree | 92ec46cc965bdcf77c9b3a204d93cbbda82a582e /mailscripts.el | |
parent | 73f4786d9315c5e40e88f8f34fb221ba4fbe5355 (diff) | |
download | mailscripts-ce481dee7327c6ee4809370658009ee29994adcb.tar.gz |
notmuch-slurp-debbug: invoke notmuch to find the thread-id
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'mailscripts.el')
-rw-r--r-- | mailscripts.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mailscripts.el b/mailscripts.el index 36f5732..50e3b89 100644 --- a/mailscripts.el +++ b/mailscripts.el @@ -54,7 +54,15 @@ If NO-OPEN, don't open the thread." (interactive "sBug number: ") (call-process-shell-command (concat "notmuch-slurp-debbug " bug)) (unless no-open - (notmuch-show (concat "Bug#" bug)))) + (let* ((search (concat "Bug#" bug)) + (thread-id (car (process-lines notmuch-command + "search" + "--output=threads" + "--limit=1" + "--format=text" + "--format-version=4" search)))) + (notmuch-show thread-id nil nil nil + (concat "*notmuch-show-" search "*"))))) ;;;###autoload (defun notmuch-slurp-debbug-at-point () |