summaryrefslogtreecommitdiff
path: root/mailscripts.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-27 09:05:23 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-11-27 09:05:23 -0700
commit38bc9283bfeb1b10f695e82e40e49bbf0e510553 (patch)
tree3506f50aa424e377a48cef3b2fb60d1a5c2723a6 /mailscripts.el
parent72ce929c86b9404e566b84f94769f03686066745 (diff)
parent0f4661cde91646c0481d00413d1188cf538829d5 (diff)
downloadmailscripts-38bc9283bfeb1b10f695e82e40e49bbf0e510553.tar.gz
Merge tag 'debian/0.15-1' into buster-bpo
mailscripts release 0.15-1 for unstable (sid) [dgit] [dgit distro=debian no-split --quilt=linear] # gpg: Signature made Thu 21 Nov 2019 03:34:55 PM MST # gpg: using RSA key 9B917007AE030E36E4FC248B695B7AE4BF066240 # gpg: Good signature from "Sean Whitton <spwhitton@spwhitton.name>" [ultimate] # Primary key fingerprint: 8DC2 487E 51AB DD90 B5C4 753F 0F56 D055 3B6D 411B # Subkey fingerprint: 9B91 7007 AE03 0E36 E4FC 248B 695B 7AE4 BF06 6240
Diffstat (limited to 'mailscripts.el')
-rw-r--r--mailscripts.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/mailscripts.el b/mailscripts.el
index 916aec8..9c51f73 100644
--- a/mailscripts.el
+++ b/mailscripts.el
@@ -1,7 +1,7 @@
;;; mailscripts.el --- functions to access tools in the mailscripts package
;; Author: Sean Whitton <spwhitton@spwhitton.name>
-;; Version: 0.13
+;; Version: 0.15
;; Package-Requires: (notmuch projectile)
;; Copyright (C) 2018, 2019 Sean Whitton
@@ -68,7 +68,17 @@ particular, this Emacs Lisp function supports passing only entire
threads to the notmuch-extract-patch(1) command."
(interactive
"Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): \np")
- (let ((thread-id notmuch-show-thread-id)
+ (let ((thread-id
+ ;; If `notmuch-show' was called with a notmuch query rather
+ ;; than a thread ID, as `org-notmuch-follow-link' in
+ ;; org-notmuch.el does, then `notmuch-show-thread-id' might
+ ;; be an arbitrary notmuch query instead of a thread ID. We
+ ;; need to wrap such a query in thread:{} before passing it
+ ;; to notmuch-extract-patch(1), or we might not get a whole
+ ;; thread extracted (e.g. if the query is just id:foo)
+ (if (string= (substring notmuch-show-thread-id 0 7) "thread:")
+ notmuch-show-thread-id
+ (concat "thread:{" notmuch-show-thread-id "}")))
(default-directory (expand-file-name repo)))
(mailscripts--check-out-branch branch)
(shell-command