summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-09-20 23:22:14 -0400
committerKyle Meyer <kyle@kyleam.com>2020-09-21 23:26:02 -0400
commite1201395d3aaecc00f15d5b354da72ff0ce4ce7e (patch)
tree0113d94367eb2f71e4e5c4465663f0f888b27a69
parent087ed89c30fe96fc7ff1ed13c0895317d180c4d1 (diff)
downloadpiem-e1201395d3aaecc00f15d5b354da72ff0ce4ce7e.tar.gz
piem-name-branch-who-what-v: Relax sender name extraction
Let-bind mail-extr-ignore-realname-equals-mailbox-name to nil (defaults to t) so that a sender name is returned for addresses like "name <name@a.com>" and "name@a.com". Also, let-bind mail-extr-ignore-single-names to its default value of nil so that a user setting this option to t doesn't interfere with piem-name-branch-who-what-v. Message-Id: <20200921032214.16940-1-kyle@kyleam.com>
-rw-r--r--piem.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/piem.el b/piem.el
index 6ec757d..eb7b2f8 100644
--- a/piem.el
+++ b/piem.el
@@ -38,6 +38,7 @@
;;; Code:
(require 'cl-lib)
+(require 'mail-extr)
(require 'message)
(require 'piem-maildir)
(require 'rfc2047)
@@ -611,7 +612,9 @@ indicated in the subject.
INFO is a plist with properties documented
in `piem-default-branch-function'."
(when-let ((from (plist-get info :from))
- (sender (car (mail-extract-address-components from)))
+ (sender (let ((mail-extr-ignore-single-names nil)
+ (mail-extr-ignore-realname-equals-mailbox-name nil))
+ (car (mail-extract-address-components from))))
(subject (plist-get info :subject)))
(let* ((subnames (split-string sender))
(initials (mapconcat