I finished getting Excorporate and all its dependencies into GNU ELPA. Excorporate lets Emacs retrieve calendar items from an Exchange server.
I had to rewrite the default UI to use Org Mode, because Calfw isn’t entirely copyright-assigned to the FSF yet. The Calfw UI is still there for reference, but as a text file so that GNU ELPA’s build and publishing steps ignore it. Both UI handlers use the same updated APIs from the main
I made sure Excorporate and all its dependencies use only features available since GNU Emacs 24.1. This is pretty good coverage; Emacs 24.1 introduced the packaging system, so if an Emacs version supports packages, it supports Excorporate.
Other than DNS lookups, Excorporate is completely asynchronous, so it won’t block the Emacs main loop. And it is pure Emacs Lisp so it runs on any operating system that Emacs does.
In addition to Org Mode support, release 0.7.0 collects all the suggestions users have made on this blog and adds Exchange 2007 support.
M-x package-install RET excorporate
To get the source code:
git clone git://git.savannah.gnu.org/emacs/elpa.git
To report bugs:
Great package! Installed upon my first sight of it. I’ve done programming against EWS for a few years in a bunch of languages, but just don’t have the courage to do it again with elisp… Is there a plan to support basic emails operations?
Thanks Jerome. I’m not planning on implementing email operations myself, since Exchange’s IMAP support works fine for me with Gnus. My primary interest is accessing calendar entries from within Emacs. But I’ve tried to create reusable APIs (see the exco-operate function, for example), and I would probably accept patches to support email operations. Programming EWS in Elisp is more fun than in other languages, I expect.
Noted. Too bad my company doesn’t seem to allow IMAP at all 🙁 I enjoyed Gnus quite a bit with my personal mailbox, yet have no idea how to “integrate” a different backend with it, hmmm.
For people looking to get Emacs or Mutt based email, look at davmail. It works with offlineimap or with Gnus as described here. http://blog.binchen.org/posts/how-to-get-email-from-exchange-server-without-outlook.html
Hi Thomas. Thanks for creating this. It looks like a great package and I can’t wait to get it working. After I install it with ELPA and run M-x excorporate, I get the message:
Wrong type argument: symbolp, (:fsm exco–fsm :state nil :state-data nil :sleep #[(secs) “ÁÂ^H\”\207” [secs accept-process-output nil] 3\
] :deferred nil)
Then I M-x describe-variable excorporate-configuration, skip autodiscovery, enter in my email and aws/exchange.asmx addresses, apply and save. But I still get the same error message. I’m not familiar with debugging elisp yet; can you point me in the right direction?
Thank you again!
Can you try this on the command line:
and then try your steps again?
Love it, but I’m trying to get it work with org-agenda but have no success. what I would like to have is something like %%(exco-org-agenda) (sort of a diary sexp) in my org-files that would result in my meetings(in exchange) becomes a part of my org-agenda. Any idea on how to accomplish that?
It would slow down agenda but that is something I am prepared to live with, and it could be memonized/cached
Here’s something gross that might work for the current day (after pressing e in *Calendar* as usual):
(defadvice exco-org-insert-meetings (after exco-org-save-meetings activate)
(with-current-buffer (get-buffer-create excorporate-org-buffer-name)
(when (file-exists-p “~/.emacs.d/excorporate.tmp.org”)
(delete-file “~/.emacs.d/excorporate.tmp.org” nil))
(write-file “~/.emacs.d/excorporate.tmp.org” nil)
(add-to-list ‘org-agenda-files “~/.emacs.d/excorporate.tmp.org”)
With 0.7.1, the SOAP calls that Excorporate makes are simplistic and day-based, but EWS provides much more sophisticated ways of collecting calendar entries. Maybe in a post-1.0 release I will implement local caching and efficient retrieval of large numbers of events, but for now (and up to 1.0) I’m mainly focused on getting users authenticated and talking EWS, and on defining the core API.
In the meantime I’d happily accept FSF-assigned patches to implement more features 🙂
I am having trouble to get this work. I think it is because I have to use domainname\username to logon onto the EWS server. The username is different from the email address as well.
Is there a way I can manually put this information into my .emacs?
I did try the ‘M-x customize-variable RET excorporate-configuration’ as well, using both my email address and name of the exchange server, as well as the domain\user combination.
Thanks for your efforts.
I sent you an email so that we can discuss your authentication issue.
This is awesome thank you so much!
I’ve tried to set it up, connections to the server seems to work after switching of autodiscovery.
Excorporate: Connection (“myemailaddress” . “ServerEMSAddresse”) is ready
But if I look in the Calendar, and press e, it opens the org mode buffer but there are not entries in the Calendar section.
Also, the top line of the buffer just says
without my mail address or done.
Ah, got it to work. I had to use a different user name.
Is there any way to access group calendars ?
I’ve never tried accessing a group calendar. If you know Emacs Lisp you could experiment with the exco-operate function to try to access them.
I’m trying to get excorporate working with my exchange server. Autodiscovery seems to be working, but I’m getting a ‘Invalid user’ error.
I’ve set the Excorporate Configuration field to: ‘firstname.lastname@example.org’ in order to get auto-discovery working. Which it seems to. I see in the Messages buffer the following:
Excorporate: Found autodiscovery URL for “email@example.com”: https://servername.domain.name/autodiscover/autodiscover.svc
Contacting host: servername.domain.name:443
Excorporate: Invalid user ‘firstname.lastname@example.org’ specified.
As best I can tell, excorporate is sending the entire string ‘email@example.com’ in order to log in, but should only be sending ‘username’.
Running Emacs 24.5.1 on CentOS 6.5 with Excorporate 0.7.3 from GNU ELPA.
Thanks a lot !
Thanks for trying autodiscovery and reporting the results.
Can you try customizing excorporate-configuration, and selecting “Skip autodiscovery”. In the “Exchange mail address” field, enter just your username.
Let me know if that works around the autodiscovery issue.
I’m having a few problems, some of which i have fixed, some of which i would like help
– first was a problem with FSM and (symbol function declared void closure) – which was fixed by reverting any other FSM’s in favor of the 24.5 builtin
– Second problem is NTLM auth or http auth or whatever. I can auth, but where can i keep the username/password for autoauth. the NTLM package mentions something about being able to store NTLM hashes, but no idea if this is the right approach (feature?)
– Third, my outlook has migrated to office365, and office online. i tried the default email login, but it could not discover the autodiscover. After some faffing around ithink i found out that autodiscovery is https://outlook.office365.com/autodiscover/autodiscover.svc, but not sure if thats the right URI. Its certainly being picked up by excorporate (I’m guessing this is the same for hotmail/other free office365 users)
Anyway, I’m not getting any further. I’m getting errors like:
gnutls.c:  (Emacs) fatal error: Error in the pull function.
Unknown SOAP service: ExchangeServicePort [4 times]
“exco–fsm/:retrieving-data update didn’t work: (wrong-type-argument arrayp nil)”
– fourth, I’m not sure what do to with it with regards to org-mode an org-agenda. I use org-gcal to sync google calendars, and it syncs an org-file with calendar information that i can also use offline. Can i do this with excorporate? my experiments are not conclusive.
1) I just pushed a fix into fsm 0.2.1. Can you see if that still gives you symbol problems? If so, please file a bug with the error, with M-x report-emacs-bug.
2) Check out the auth-sources package and its documentation.
3) Customize excorporate-configuration to skip autodiscovery. Other users have reported Excorporate (use 0.7.5) working with Office365 for them when they skipped autodiscovery.
4) That’s a planned feature; right now it just retrieve’s a single day’s meetings. I recently discovered gnus-icalendar, and I’ thinking of implementing background fetching into that format. Is that the same format org-gcal uses? Ideally all these modes should agree on output formats via a common “middle-end” with backends for diary, org, etc.
I can’t wait for this package to start working. It will enhance my emacs experience at work 🙂
I’m running into an issue- I keep getting the following error when I run:
Contacting host: west.mail.splunk.com:443
“HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm=\”mail.mydomain.com\”
Date: Fri, 13 Jan 2017 17:46:39 GMT
I can connect to this via web browser against this url and after I enter my credentials, the ‘services.wsdl’ gets returned. What other troubleshooting steps would you recommend?
Thanks for all your work on this!
To be clear, you’ve installed excorporate 0.7.6 from GNU ELPA, tried it, and it fails, both autodiscovery and excorporate-configuration methods? You can check how far it got in the *fsm-debug* buffer.
In the test you’re doing, did you first make sure url-http-ntlm was loaded? You can verify that by making sure “ntlm” is in the variable url-registered-auth-schemes. Setting url-debug t might help; if it’s attempting NTLM authentication you’ll see multiple 401 iterations during the NTLM auth phases. But what you pasted only shows one 401, hmm.
Leave a comment