summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-15 15:05:30 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-15 15:05:30 -0700
commit8d52c3f7200582d4711ef0a189a535892ce9d652 (patch)
tree1929dcb6fcf3981d7249545f0685cbb25ab4d7bd
parent3810cdf4464b16484fe1672765b01d9734bed318 (diff)
downloadmailscripts-8d52c3f7200582d4711ef0a189a535892ce9d652.tar.gz
mailscripts.el: don't always pass --reroll-count
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog3
-rw-r--r--mailscripts.el15
2 files changed, 13 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index aa988d0..076bc77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ mailscripts (0.18-1) UNRELEASED; urgency=medium
+ --trailers is on by default; use --no-trailers to disable.
- Stop outputting message subjects on standard error.
* New dependencies on liblist-moreutils-perl, libmail-box-perl.
+ * mailscripts.el: instead of defaulting to passing --reroll-count=1 to
+ notmuch-extract-patch, don't pass any reroll count unless there is a
+ prefix arg.
-- Sean Whitton <spwhitton@spwhitton.name> Sat, 15 Feb 2020 09:06:56 -0700
diff --git a/mailscripts.el b/mailscripts.el
index 3d65006..fd60222 100644
--- a/mailscripts.el
+++ b/mailscripts.el
@@ -67,7 +67,7 @@ See notmuch-extract-patch(1) manpage for limitations: in
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")
+ "Dgit repo: \nsbranch name (or leave blank to apply to current HEAD): \nP")
(let ((thread-id
;; If `notmuch-show' was called with a notmuch query rather
;; than a thread ID, as `org-notmuch-follow-link' in
@@ -82,9 +82,12 @@ threads to the notmuch-extract-patch(1) command."
(default-directory (expand-file-name repo)))
(mailscripts--check-out-branch branch)
(shell-command
- (format "notmuch-extract-patch -v%d %s | git am"
- (if reroll-count reroll-count 1)
- (shell-quote-argument thread-id))
+ (if reroll-count
+ (format "notmuch-extract-patch -v%d %s | git am"
+ (prefix-numeric-value reroll-count)
+ (shell-quote-argument thread-id))
+ (format "notmuch-extract-patch %s | git am"
+ (shell-quote-argument thread-id)))
"*notmuch-apply-thread-series*")))
;;;###autoload
@@ -92,7 +95,9 @@ threads to the notmuch-extract-patch(1) command."
"Like `notmuch-extract-thread-patches', but use projectile to choose the repo."
(interactive)
(mailscripts--projectile-repo-and-branch
- 'notmuch-extract-thread-patches (prefix-numeric-value current-prefix-arg)))
+ 'notmuch-extract-thread-patches
+ (when current-prefix-arg
+ (prefix-numeric-value current-prefix-arg))))
;;;###autoload
(defun notmuch-extract-message-patches (repo branch)