branch: master
commit 530b4e22678afb19c222946070378128b22cdefd
Author: Thomas Fitzsimmons <fitz...@fitzsim.org>
Commit: Thomas Fitzsimmons <fitz...@fitzsim.org>

    packages/excorporate: Handle nil list of main invitees
    
    * packages/excorporate/excorporate.el
    (exco-calendar-item-iterate): Handle nil list of main invitees.
    * packages/excorporate/excorporate-org.el
    (exco-org-insert-meeting): Likewise.
    * packages/excorporate/excorporate-calfw.el.txt
    (exco-calfw-add-meeting): Likewise.
---
 packages/excorporate/excorporate-calfw.el.txt |    8 ++++----
 packages/excorporate/excorporate-org.el       |    5 +++--
 packages/excorporate/excorporate.el           |    4 +++-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/packages/excorporate/excorporate-calfw.el.txt 
b/packages/excorporate/excorporate-calfw.el.txt
index ad31ae9..11bdfe8 100644
--- a/packages/excorporate/excorporate-calfw.el.txt
+++ b/packages/excorporate/excorporate-calfw.el.txt
@@ -61,10 +61,10 @@ are the requested participants."
     (make-cfw:event :title (concat
                            (format "\n\t%s" subject)
                            (format "\n\tLocation: %s" location)
-                           (format "\n\tInvitees: %s"
-                                   (mapconcat 'identity
-                                              main-invitees
-                                              "; "))
+                           (when main-invitees
+                             (format "\n\tInvitees: %s"
+                                     (mapconcat 'identity
+                                                main-invitees "; ")))
                            (when optional-invitees
                              (format "\n\tOptional: %s"
                                      (mapconcat 'identity
diff --git a/packages/excorporate/excorporate-org.el 
b/packages/excorporate/excorporate-org.el
index 8613f8e..73aaa52 100644
--- a/packages/excorporate/excorporate-org.el
+++ b/packages/excorporate/excorporate-org.el
@@ -88,8 +88,9 @@ are the requested participants."
   (insert (format "+ Duration: %d minutes\n"
                  (round (/ (float-time (time-subtract end start)) 60.0))))
   (insert (format "+ Location: %s\n" location))
-  (insert "+ Invitees:\n")
-  (exco-org-insert-invitees main-invitees)
+  (when main-invitees
+    (insert "+ Invitees:\n")
+    (exco-org-insert-invitees main-invitees))
   (when optional-invitees
     (insert "+ Optional invitees:\n")
     (exco-org-insert-invitees optional-invitees)))
diff --git a/packages/excorporate/excorporate.el 
b/packages/excorporate/excorporate.el
index 69585d6..9b1db7d 100644
--- a/packages/excorporate/excorporate.el
+++ b/packages/excorporate/excorporate.el
@@ -649,7 +649,9 @@ OPTIONAL-INVITEES, a list of strings representing optional 
participants."
                                   end 'dateTime)))
             (location (cdr (assoc 'Location calendar-item)))
             (to-invitees (cdr (assoc 'DisplayTo calendar-item)))
-            (main-invitees (mapcar 'org-trim (split-string to-invitees ";")))
+            (main-invitees (when to-invitees
+                             (mapcar 'org-trim
+                                     (split-string to-invitees ";"))))
             (cc-invitees (cdr (assoc 'DisplayCc calendar-item)))
             (optional-invitees (when cc-invitees
                                  (mapcar 'org-trim

Reply via email to