discussion and development of piem
 help / color / mirror / code / Atom feed
* [PATCH] piem-name-branch-who-what-v: Relax sender name extraction
@ 2020-09-21  3:22 Kyle Meyer
  0 siblings, 0 replies; only message in thread
From: Kyle Meyer @ 2020-09-21  3:22 UTC (permalink / raw)
  To: piem

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.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 @@ (defun piem-name-branch-who-what-v (info)
 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

base-commit: 087ed89c30fe96fc7ff1ed13c0895317d180c4d1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-21  3:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  3:22 [PATCH] piem-name-branch-who-what-v: Relax sender name extraction Kyle Meyer

discussion and development of piem

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.kyleam.com/piem/0 piem/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 piem piem/ https://inbox.kyleam.com/piem \
	public-inbox-index piem

Example config snippet for mirrors.
Newsgroup available over NNTP:

code repositories for project(s) associated with this inbox:


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git