Comments (7)
It's not a problem in org-caldav but in the url-dav package which ships with Emacs.
When this happens, could you take a look at the buffer which appears as the first argument to url-dav-process-response? In the above backtrace, it's " http owncloud.e6h.org:443" (note the leading space!).
from org-caldav.
Oh, you're right. Sorry.
That buffer is empty and has no process. If I remove the unwind-protect
from url-dav-process-response
we can see the real problem:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(save-current-buffer (set-buffer buffer) (goto-char url-http-end-of-headers) (indent-rigidly (point) (point-max) -1000) (save-excursion (while (re-s$
(progn (save-current-buffer (set-buffer buffer) (goto-char url-http-end-of-headers) (indent-rigidly (point) (point-max) -1000) (save-excursion (whil$
(if buffer (progn (save-current-buffer (set-buffer buffer) (goto-char url-http-end-of-headers) (indent-rigidly (point) (point-max) -1000) (save-excu$
(let ((tree nil) (overall-status nil)) (sleep-for 5) (message "%s" url) (message "%s" buffer) (if buffer (progn (save-current-buffer (set-buffer buf$
url-dav-process-response(#<buffer *http owncloud.e6h.org:443*-923814> "https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/")
url-dav-request("https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/" "PROPFIND" DAV:propfind "<DAV:prop><DAV:getetag/></DAV:prop>" 1 nil $
url-dav-get-properties("https://owncloud.e6h.org/remote.php/caldav/calendars/egh/org/" (DAV:getetag) 1)
org-caldav-get-event-etag-list()
org-caldav-update-eventdb-from-cal()
org-caldav-sync()
I did notice that org-caldav-get-event-etag-list
gets called a number of times, and I think the problem may be url-http
reusing connections. The following hack fixes the error by caching the return value of org-caldav-get-event-etag-list
, but it obviously doesn't fix the underlying problem.
(defvar egh:org-caldav-get-event-etag-list-cache nil)
(defadvice org-caldav-get-event-etag-list (around org-caldav-get-event-etag-list-around activate)
(if (null egh:org-caldav-get-event-etag-list-cache)
(setq egh:org-caldav-get-event-etag-list-cache
ad-do-it))
(setq ad-return-value egh:org-caldav-get-event-etag-list-cache))
but that is obviously not the right solution.
from org-caldav.
In fact, that doesn't seem to fix the error, except that calling the function org-caldav-get-event-etag-list
before calling org-caldav-sync
works. So if you cache the result of that call, the call to org-caldav-sync works.
from org-caldav.
As you might have seen, url-dav-request calls url-retrieve-synchronously to do the DAV request, and it seems that this fails. The question is why that happens. I wouldn't know why reusing a http connection could cause this. Unfortunately, url-dav does not care much for error handling, but usually assumes that everything just works... Since I cannot reproduce this, it's hard for me to guess what's going on. All you can do is to try to figure out why the call to url-retrieve-synchronously fails and returns an empty buffer.
from org-caldav.
Thanks. If I rewrite url-http-find-free-connection
to not reuse connections, syncing works. It looks like a problem with url-http. I'll report upstream.
from org-caldav.
Filed emacs bug. http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14983
from org-caldav.
OK, I'll close it here, then.
from org-caldav.
Related Issues (20)
- Repeating events on calendar do not repeat on org side HOT 3
- Events deleted on calendar are not deleted on org side HOT 3
- Events with org mode syntax in their description seem to mess up the org file HOT 1
- Add note about todo keywords to ignore for percent-states HOT 1
- Google OAuth 2.0 failing with Error 400: invalid_request HOT 18
- Problem with IDs.
- Close sync result buffer with keybind HOT 1
- Syncing only TODOs HOT 2
- Feature: Webcal support HOT 11
- Document dependency on `org-id-track-globally'
- Calendar events before 1970 are not synced properly HOT 1
- org-caldav-files default value causes error? HOT 2
- Private sync HOT 1
- Documentation improvement request HOT 2
- Improve manual
- Fresh sync on TODO/task HOT 3
- Creation of ID properties on every headings HOT 4
- Is it possible to sync tasks (TODO) items to and from Google Calendar? HOT 1
- Importing cal events with SCHEDULED/DEADLINE labels HOT 1
- Testing the plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-caldav.