summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-05-05 07:49:50 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-05-05 07:55:30 -0700
commit2f1ccd039ec0b1c4f33d682afc51d6dc6993eb63 (patch)
tree5cf1b1cc67be9584a789343e1f021bb1dcef2ea3
parenta9bc6cb4b501602db6947ba3ce90d040105151e0 (diff)
downloadmailscripts-2f1ccd039ec0b1c4f33d682afc51d6dc6993eb63.tar.gz
mailscripts.el: notmuch-extract-message-patches: improve regexp
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog2
-rw-r--r--mailscripts.el6
2 files changed, 5 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 53a9be1..e5a1452 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ mailscripts (0.20-1) UNRELEASED; urgency=medium
- Add mailscripts-detach-head-from-existing-branch defcustom.
- notmuch-extract-message-patches: set NO-STRICT-MIME argument of
`mm-dissect-buffer' to enable extracting patches from more messages.
+ - notmuch-extract-message-patches: attempt to improve regexp to
+ extract more wanted patches.
* maildir-import-patch: Prepend "[PATCH fooproject imported]" to the
subject lines of patches, unless the user supplies a --subject-prefix
option to be passed on to git-format-patch(1).
diff --git a/mailscripts.el b/mailscripts.el
index 193ca5c..2280f5a 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.18
+;; Version: 0.20
;; Package-Requires: (notmuch projectile)
;; Copyright (C) 2018, 2019 Sean Whitton
@@ -130,8 +130,8 @@ git-format-patch(1)."
(let* ((disposition (mm-handle-disposition p))
(filename (cdr (assq 'filename disposition))))
(and filename
- (string-match
- "^\\(v[0-9]+-\\)?[0-9]+-.+\.\\(patch\\|diff\\|txt\\)$" filename)
+ (string-match "^\\(v?[0-9]+\\)-.+\\.\\(patch\\|diff\\|txt\\)$"
+ filename)
(mm-pipe-part p "git am"))))
mm-handle))))