Subject: Re: bug#22969: 24.5; excorporate 0.7.0 split-string failure

From: Thomas Fitzsimmons <[email-masked]>
Date: Wed, 09 Mar 2016 18:46:19 -0500

Hi Devon,

Devon Gleeson <[email-masked]> writes:

> I installed excorporate from elpa. Excorporate connected to my exchange
> server and said it was ready. I opened my calendar and hit the 'e' key,
> I saw the following error in my mini-buffer and in *Messages*
>
> Scheduled to <2016-03-09 Wed 18:00>
> error in process filter: split-string: Wrong type argument: stringp, nil
> error in process filter: Wrong type argument: stringp, nil
>
> The org-mode document *Excorporate* rendered, but had an incomplete list
> of calendar events.

Thanks for the bug report.  This happens when there are no invitees.
This will be fixed in 0.7.3 once I can merge soap-client.el, which
diverged on emacs-master.  In the meantime, I suspect these patches will
fix it for you (apply by hand):

--- ./excorporate.el~
+++ ./excorporate.el
@@ -649,7 +649,9 @@ (defun exco-calendar-item-iterate (response callback)
 				   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

--- ./excorporate-org.el~
+++ ./excorporate-org.el
@@ -88,8 +88,9 @@ (defun exco-org-insert-meeting (subject start end location
   (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)))

Thomas