emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb b9da0f4 142/350: Check Organization headers and di


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb b9da0f4 142/350: Check Organization headers and display/update organization records
Date: Mon, 14 Aug 2017 11:46:23 -0400 (EDT)

branch: externals/ebdb
commit b9da0f4f27db5d5b1d56666103360062ec5f8f20
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Check Organization headers and display/update organization records
    
    * ebdb-mua.el (ebdb-message-headers): Add an 'organization entry to
      this alist, and check the "Organization:" header.
      (ebdb-annotate-message): Check the header type and create an
      organization record if that's what we're looking at.
---
 ebdb-mua.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ebdb-mua.el b/ebdb-mua.el
index e075800..1127778 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -122,7 +122,8 @@ whether the records in question are actually displayed or 
not."
 
 (defcustom ebdb-message-headers
   '((sender     "From" "Resent-From" "Reply-To" "Sender")
-    (recipients "Resent-To" "Resent-CC" "To" "CC" "BCC"))
+    (recipients "Resent-To" "Resent-CC" "To" "CC" "BCC")
+    (organization "Organization"))
   "Alist of headers to search for sender and recipients mail addresses.
 Each element is of the form
 
@@ -880,6 +881,9 @@ Return the records matching ADDRESS or nil."
          (name (unless (or (equal mail (car address))
                           (null (car address)))
                  (car address)))
+        (record-class (if (eql (nth 4 address) 'organization)
+                          'ebdb-record-organization
+                        ebdb-default-record-class))
          (records (ebdb-message-search name mail))
          created-p new-records)
     (if (and (not records) (functionp update-p))
@@ -905,7 +909,7 @@ Return the records matching ADDRESS or nil."
           (setq records (list (ebdb-db-add-record
                               (car ebdb-db-list)
                               (make-instance
-                               (slot-value (car ebdb-db-list) 'record-class))))
+                               record-class)))
                 created-p t)))
 
     (dolist (record records)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]