emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problems with org-caldav (wrong-type-argument stringp 47)
@ 2013-01-26 14:20 Sven Bretfeld
  2013-01-26 17:32 ` David Engster
  0 siblings, 1 reply; 15+ messages in thread
From: Sven Bretfeld @ 2013-01-26 14:20 UTC (permalink / raw)
  To: Org-Mode

Hi

Thank you very much for org-caldav. I've waited for it since years.
However, I have problems on my first sync. I think I have done
everything correctly:

(setq load-path (cons "~/elisp/org-caldav" load-path))
(require 'org-caldav)
(setq org-caldav-url "https://www.google.com/calendar/dav")
(setq org-caldav-calendar-id "######@group.calendar.google.com")
(setq org-caldav-inbox "/home/sven/Dropbox/myconf/testcal.org")
(setq org-caldav-files "/home/sven/Dropbox/myconf/testlocalcal.org")
;(setq org-icalendar-timezone "Europe/Berlin")

I also replaced url-dav.el by the patched version (I'm using Emacs
23.4.1 under Ubuntu). 

Find below an error report, that comes after some seconds (sometimes a
minute) during the initial sync. The minibuffer displays "Reading 543
Bytes" for some time, then it breaks with the error-message. Neither the
files, nor GoogleCalendar show any changes afterwards (e.g. no IDs are
created in testlocalcal.org).

I'm hoping that I can get this to work.

Thanks for help,

Sven

Debugger entered--Lisp error: (wrong-type-argument stringp 47)
  file-exists-p(47)
  (not (file-exists-p file))
  (if (not (file-exists-p file)) (progn (message "non-existent agenda file %s. [R]emove from list or [A]bort?" ...) (let ... ...)))
  (when (not (file-exists-p file)) (message "non-existent agenda file %s. [R]emove from list or [A]bort?" (abbreviate-file-name file)) (let (...) (cond ... ...)))
  org-check-agenda-file(47)
  (if (bufferp file) (set-buffer file) (org-check-agenda-file file) (set-buffer (org-get-agenda-file-buffer file)))
  (catch (quote nextfile) (if (bufferp file) (set-buffer file) (org-check-agenda-file file) (set-buffer ...)) (widen) (setq bmp (buffer-modified-p)) (org-refresh-category-properties) (setq org-todo-keywords-for-agenda (append org-todo-keywords-for-agenda org-todo-keywords-1)) (setq org-done-keywords-for-agenda (append org-done-keywords-for-agenda org-done-keywords)) (setq org-todo-keyword-alist-for-agenda (append org-todo-keyword-alist-for-agenda org-todo-key-alist)) (setq org-drawers-for-agenda (append org-drawers-for-agenda org-drawers)) (setq org-tag-alist-for-agenda (append org-tag-alist-for-agenda org-tag-alist)) (save-excursion (remove-text-properties ... ... pall) (when org-agenda-skip-archived-trees ... ...) (goto-char ...) (setq re ...) (while ... ...)) (set-buffer-modified-p bmp)
 )
  (while (setq file (pop files)) (catch (quote nextfile) (if ... ... ... ...) (widen) (setq bmp ...) (org-refresh-category-properties) (setq org-todo-keywords-for-agenda ...) (setq org-done-keywords-for-agenda ...) (setq org-todo-keyword-alist-for-agenda ...) (setq org-drawers-for-agenda ...) (setq org-tag-alist-for-agenda ...) (save-excursion ... ... ... ... ...) (set-buffer-modified-p bmp)))
  (save-restriction (while (setq file ...) (catch ... ... ... ... ... ... ... ... ... ... ... ...)))
  (save-excursion (save-restriction (while ... ...)))
  (let ((pa ...) (pc ...) (pall ...) (inhibit-read-only t) (rea ...) bmp file re) (save-excursion (save-restriction ...)) (setq org-todo-keywords-for-agenda (org-uniquify org-todo-keywords-for-agenda)) (setq org-todo-keyword-alist-for-agenda (org-uniquify org-todo-keyword-alist-for-agenda) org-tag-alist-for-agenda (org-uniquify org-tag-alist-for-agenda)))
  org-agenda-prepare-buffers((47 104 111 109 101 47 115 118 101 110 47 68 114 111 112 98 111 120 47 109 121 99 111 110 102 47 116 101 115 116 108 111 99 97 108 99 97 108 46 111 114 103 "/home/sven/Dropbox/myconf/testcal.org"))
  (save-excursion (org-agenda-prepare-buffers files) (let* (... file ical-file ical-buffer category started org-agenda-new-buffers) (and ... ...) (when combine ... ... ...) (while ... ...) (org-release-buffers org-agenda-new-buffers)))
  org-export-icalendar(t 47 104 111 109 101 47 115 118 101 110 47 68 114 111 112 98 111 120 47 109 121 99 111 110 102 47 116 101 115 116 108 111 99 97 108 99 97 108 46 111 114 103 "/home/sven/Dropbox/myconf/testcal.org")
  apply(org-export-icalendar t (47 104 111 109 101 47 115 118 101 110 47 68 114 111 112 98 111 120 47 109 121 99 111 110 102 47 116 101 115 116 108 111 99 97 108 99 97 108 46 111 114 103 "/home/sven/Dropbox/myconf/testcal.org"))
  (let ((org-combined-agenda-icalendar-file ...) (org-icalendar-store-UID t) (org-icalendar-date-time-format ...)) (org-caldav-debug-print (format "Generating ICS file %s." org-combined-agenda-icalendar-file)) (apply (quote org-export-icalendar) t (append org-caldav-files ...)) (find-file-noselect org-combined-agenda-icalendar-file))
  org-caldav-generate-ics()
  (setq org-caldav-ics-buffer (org-caldav-generate-ics))
  (if (and org-caldav-event-list (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")) nil (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (setq org-caldav-event-list nil) (setq org-caldav-sync-result nil) (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list) (org-caldav-event-set-status cur nil)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer) (org-caldav-update-eventdb-from-cal))
  (unless (and org-caldav-event-list (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")) (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (setq org-caldav-event-list nil) (setq org-caldav-sync-result nil) (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list) (org-caldav-event-set-status cur nil)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer) (org-caldav-update-eventdb-from-cal))
  org-caldav-sync()
  call-interactively(org-caldav-sync t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-26 14:20 Problems with org-caldav (wrong-type-argument stringp 47) Sven Bretfeld
@ 2013-01-26 17:32 ` David Engster
  2013-01-27  2:29   ` Sven Bretfeld
  0 siblings, 1 reply; 15+ messages in thread
From: David Engster @ 2013-01-26 17:32 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

Sven Bretfeld writes:
> (setq org-caldav-files "/home/sven/Dropbox/myconf/testlocalcal.org")

No, that's wrong. It has to be a list of files:

(setq org-caldav-files '("/home/sven/Dropbox/myconf/testlocalcal.org"))

-David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-26 17:32 ` David Engster
@ 2013-01-27  2:29   ` Sven Bretfeld
  2013-01-27 15:07     ` David Engster
  0 siblings, 1 reply; 15+ messages in thread
From: Sven Bretfeld @ 2013-01-27  2:29 UTC (permalink / raw)
  To: David Engster; +Cc: Org-Mode

Hi David

David Engster <deng@randomsample.de> writes:

> Sven Bretfeld writes:
>> (setq org-caldav-files "/home/sven/Dropbox/myconf/testlocalcal.org")
>
> No, that's wrong. It has to be a list of files:
>
> (setq org-caldav-files '("/home/sven/Dropbox/myconf/testlocalcal.org"))

Yes, that did it. Thank you. Now syncing works but with error messages that
appear sometimes: 

- progn: Could not find UID emacs207403667799062360.

And at other times:

- void-function pop-to-buffer-same-window

Could the last one be a function not implemented in my 23 version of
Emacs? See a full debugg below. The first one is strange to me too.

That's a nice package. I'm trying to automatize the sync process by a
cronjob and tell you my experiences.

Sven



Debugger entered--Lisp error: (void-function pop-to-buffer-same-window)
  (pop-to-buffer-same-window (current-buffer))
  (save-current-buffer (set-buffer (get-buffer-create "*org caldav sync result*")) (setq buffer-read-only nil) (erase-buffer) (insert "CalDAV Sync finished.\n\n") (if (null org-caldav-sync-result) (insert "Nothing was done.") (insert "== Sync errors: \n\n") (let ... ...) (insert "\n== Successful syncs: \n\n") (org-caldav-sync-result-print-entries ...)) (pop-to-buffer-same-window (current-buffer)) (setq buffer-read-only t) (goto-char (point-min)) (use-local-map org-caldav-sync-results-mode-map))
  (with-current-buffer (get-buffer-create "*org caldav sync result*") (setq buffer-read-only nil) (erase-buffer) (insert "CalDAV Sync finished.\n\n") (if (null org-caldav-sync-result) (insert "Nothing was done.") (insert "== Sync errors: \n\n") (let ... ...) (insert "\n== Successful syncs: \n\n") (org-caldav-sync-result-print-entries ...)) (pop-to-buffer-same-window (current-buffer)) (setq buffer-read-only t) (goto-char (point-min)) (use-local-map org-caldav-sync-results-mode-map))
  org-caldav-display-sync-results()
  (progn (org-caldav-display-sync-results))
  (if org-caldav-show-sync-results (progn (org-caldav-display-sync-results)))
  (when org-caldav-show-sync-results (org-caldav-display-sync-results))
  org-caldav-sync()
  call-interactively(org-caldav-sync t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)
Debugger entered--Lisp error: (void-function pop-to-buffer-same-window)
  (pop-to-buffer-same-window (current-buffer))
  (save-current-buffer (set-buffer (get-buffer-create "*org caldav sync result*")) (setq buffer-read-only nil) (erase-buffer) (insert "CalDAV Sync finished.\n\n") (if (null org-caldav-sync-result) (insert "Nothing was done.") (insert "== Sync errors: \n\n") (let ... ...) (insert "\n== Successful syncs: \n\n") (org-caldav-sync-result-print-entries ...)) (pop-to-buffer-same-window (current-buffer)) (setq buffer-read-only t) (goto-char (point-min)) (use-local-map org-caldav-sync-results-mode-map))
  (with-current-buffer (get-buffer-create "*org caldav sync result*") (setq buffer-read-only nil) (erase-buffer) (insert "CalDAV Sync finished.\n\n") (if (null org-caldav-sync-result) (insert "Nothing was done.") (insert "== Sync errors: \n\n") (let ... ...) (insert "\n== Successful syncs: \n\n") (org-caldav-sync-result-print-entries ...)) (pop-to-buffer-same-window (current-buffer)) (setq buffer-read-only t) (goto-char (point-min)) (use-local-map org-caldav-sync-results-mode-map))
  org-caldav-display-sync-results()
  (progn (org-caldav-display-sync-results))
  (if org-caldav-show-sync-results (progn (org-caldav-display-sync-results)))
  (when org-caldav-show-sync-results (org-caldav-display-sync-results))
  org-caldav-sync()
  call-interactively(org-caldav-sync t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27  2:29   ` Sven Bretfeld
@ 2013-01-27 15:07     ` David Engster
  2013-01-27 17:08       ` Sven Bretfeld
  2013-01-28 21:14       ` Torsten Wagner
  0 siblings, 2 replies; 15+ messages in thread
From: David Engster @ 2013-01-27 15:07 UTC (permalink / raw)
  To: Org-Mode

Sven Bretfeld writes:
> - progn: Could not find UID emacs207403667799062360.

I'm currently struck with a nasty cold, so I have trouble thinking. But
this means that it tries to find this ID in your Org files, and it does
not seem to be there. You can try to go there by calling

M-x org-id-goto

and yank the above ID. Does this get you anywhere?

If not, could you grep through your Org files and see if there's maybe
an ID which at least is similar? Maybe some special character was
stripped while putting the event.

Also, the *org-caldav-debug* buffer might contain more information.

> - void-function pop-to-buffer-same-window
>
> Could the last one be a function not implemented in my 23 version of
> Emacs?

Yes. I will have to add some compatibility code for older Emacsen.

-David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27 15:07     ` David Engster
@ 2013-01-27 17:08       ` Sven Bretfeld
  2013-01-27 17:47         ` Sven Bretfeld
  2013-01-28 21:14       ` Torsten Wagner
  1 sibling, 1 reply; 15+ messages in thread
From: Sven Bretfeld @ 2013-01-27 17:08 UTC (permalink / raw)
  To: Org-Mode

Hi David

David Engster <deng@randomsample.de> writes:

> Sven Bretfeld writes:
>> - progn: Could not find UID emacs207403667799062360.
>
> I'm currently struck with a nasty cold, so I have trouble thinking. 

Sorry to hear that. I wish you get better soon.

> But this means that it tries to find this ID in your Org files, and it
> does not seem to be there. You can try to go there by calling
>
> M-x org-id-goto
>
> and yank the above ID. Does this get you anywhere?

No, doesn't work.

> If not, could you grep through your Org files and see if there's maybe
> an ID which at least is similar? Maybe some special character was
> stripped while putting the event.

I deleted all IDs in all org-files as well as
.emacs.d/.org-id-locations. No result. The error-message remains. New
entries in GoogleCalendar are not synced to the inbox. I guess this
depends on the ID error. I have updated to Emacs 24. So this cannot be
the problem.

> Also, the *org-caldav-debug* buffer might contain more information.

Here is a debug report. The first call of org-caldav-sync always
produces this error. When called a second time with "resume last sync"
syncing from org to google works, but not the other way round.

Debugger entered--Lisp error: (error "Could not find UID emacs207412372310441120.")
  signal(error ("Could not find UID emacs207412372310441120."))
  error("Could not find UID %s." "emacs207412372310441120")
  (progn (error "Could not find UID %s." uid))
  (if (null marker) (progn (error "Could not find UID %s." uid)))
  (when (null marker) (error "Could not find UID %s." uid))
  (let ((marker (org-id-find uid t))) (when (null marker) (error "Could not find UID %s." uid)) (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (md5 (buffer-substring-no-properties (org-entry-beginning-position) (org-entry-end-position)))))
  org-caldav-generate-md5-for-org-entry("emacs207412372310441120")
  (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (org-caldav-generate-md5-for-org-entry uid)) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print (format "Org UID %s: Error. Double entry." uid)) (push (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org)))))
  (while (org-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (org-caldav-generate-md5-for-org-entry uid)) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print (format "Org UID %s: Error. Double entry." uid)) (push (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org))))))
  (save-current-buffer (set-buffer buf) (goto-char (point-min)) (while (org-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (org-caldav-generate-md5-for-org-entry uid)) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print (format "Org UID %s: Error. Double entry." uid)) (push (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org)))))) (dolist (cur (org-caldav-filter-events nil)) (org-caldav-debug-print (format "Cal UID %s: Deleted in Org" (car cur))) (org-caldav-event-set-status cur (quote deleted-in-org))))
  (with-current-buffer buf (goto-char (point-min)) (while (org-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (org-caldav-generate-md5-for-org-entry uid)) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print (format "Org UID %s: Error. Double entry." uid)) (push (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org)))))) (dolist (cur (org-caldav-filter-events nil)) (org-caldav-debug-print (format "Cal UID %s: Deleted in Org" (car cur))) (org-caldav-event-set-status cur (quote deleted-in-org))))
  org-caldav-update-eventdb-from-org(#<buffer org-caldav-8072Vxl>)
  (if (and org-caldav-event-list (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")) nil (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (setq org-caldav-event-list nil) (setq org-caldav-sync-result nil) (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list) (org-caldav-event-set-status cur nil)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer) (org-caldav-update-eventdb-from-cal))
  (unless (and org-caldav-event-list (y-or-n-p "Last sync seems to have been aborted. Should I try to resume? ")) (setq org-caldav-ics-buffer (org-caldav-generate-ics)) (setq org-caldav-event-list nil) (setq org-caldav-sync-result nil) (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list) (org-caldav-event-set-status cur nil)) (org-caldav-update-eventdb-from-org org-caldav-ics-buffer) (org-caldav-update-eventdb-from-cal))
  org-caldav-sync()
  call-interactively(org-caldav-sync t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

>> - void-function pop-to-buffer-same-window

This has vanished since my update to Emacs 24.

Sven

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27 17:08       ` Sven Bretfeld
@ 2013-01-27 17:47         ` Sven Bretfeld
  2013-01-27 20:41           ` David Engster
  0 siblings, 1 reply; 15+ messages in thread
From: Sven Bretfeld @ 2013-01-27 17:47 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

Hi David and all

I've got it. By try and error I found out that entries like these in an
org-file cause the problem:

%%(diary-anniversary  6 8 1969) Christian is %d years old

Best, and thanks for your help,

Sven

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> Hi David
>
> David Engster <deng@randomsample.de> writes:
>
>> Sven Bretfeld writes:
>>> - progn: Could not find UID emacs207403667799062360.
>>
>> I'm currently struck with a nasty cold, so I have trouble thinking. 
>
> Sorry to hear that. I wish you get better soon.
>
>> But this means that it tries to find this ID in your Org files, and it
>> does not seem to be there. You can try to go there by calling
>>
>> M-x org-id-goto
>>
>> and yank the above ID. Does this get you anywhere?
>
> No, doesn't work.
>
>> If not, could you grep through your Org files and see if there's maybe
>> an ID which at least is similar? Maybe some special character was
>> stripped while putting the event.
>
> I deleted all IDs in all org-files as well as
> .emacs.d/.org-id-locations. No result. The error-message remains. New
> entries in GoogleCalendar are not synced to the inbox. I guess this
> depends on the ID error. I have updated to Emacs 24. So this cannot be
> the problem.
>
>> Also, the *org-caldav-debug* buffer might contain more information.
>
> Here is a debug report. The first call of org-caldav-sync always
> produces this error. When called a second time with "resume last sync"
> syncing from org to google works, but not the other way round.
>
> Debugger entered--Lisp error: (error "Could not find UID
> emacs207412372310441120.")
>   signal(error ("Could not find UID emacs207412372310441120."))
>   error("Could not find UID %s." "emacs207412372310441120")
>   (progn (error "Could not find UID %s." uid))
>   (if (null marker) (progn (error "Could not find UID %s." uid)))
>   (when (null marker) (error "Could not find UID %s." uid))
>   (let ((marker (org-id-find uid t))) (when (null marker) (error
> "Could not find UID %s." uid)) (with-current-buffer (marker-buffer
> marker) (goto-char (marker-position marker)) (md5
> (buffer-substring-no-properties (org-entry-beginning-position)
> (org-entry-end-position)))))
>   org-caldav-generate-md5-for-org-entry("emacs207412372310441120")
>   (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5
> (org-caldav-generate-md5-for-org-entry uid)) (event
> (org-caldav-search-event uid))) (cond ((null event)
> (org-caldav-debug-print (format "Org UID %s: New" uid))
> (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not
> (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print
> (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event
> md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq
> (org-caldav-event-status event) (quote new-in-org))
> (org-caldav-debug-print (format "Org UID %s: Error. Double entry."
> uid)) (push (list uid (quote new-in-org) (quote error:double-entry))
> org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID
> %s: Synced" uid)) (org-caldav-event-set-status event (quote
> in-org)))))
>   (while (org-caldav-narrow-next-event) (let* ((uid
> (org-caldav-rewrite-uid-in-event)) (md5
> (org-caldav-generate-md5-for-org-entry uid)) (event
> (org-caldav-search-event uid))) (cond ((null event)
> (org-caldav-debug-print (format "Org UID %s: New" uid))
> (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not
> (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print
> (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event
> md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq
> (org-caldav-event-status event) (quote new-in-org))
> (org-caldav-debug-print (format "Org UID %s: Error. Double entry."
> uid)) (push (list uid (quote new-in-org) (quote error:double-entry))
> org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID
> %s: Synced" uid)) (org-caldav-event-set-status event (quote
> in-org))))))
>   (save-current-buffer (set-buffer buf) (goto-char (point-min)) (while
> (org-caldav-narrow-next-event) (let* ((uid
> (org-caldav-rewrite-uid-in-event)) (md5
> (org-caldav-generate-md5-for-org-entry uid)) (event
> (org-caldav-search-event uid))) (cond ((null event)
> (org-caldav-debug-print (format "Org UID %s: New" uid))
> (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not
> (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print
> (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event
> md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq
> (org-caldav-event-status event) (quote new-in-org))
> (org-caldav-debug-print (format "Org UID %s: Error. Double entry."
> uid)) (push (list uid (quote new-in-org) (quote error:double-entry))
> org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID
> %s: Synced" uid)) (org-caldav-event-set-status event (quote
> in-org)))))) (dolist (cur (org-caldav-filter-events nil))
> (org-caldav-debug-print (format "Cal UID %s: Deleted in Org" (car
> cur))) (org-caldav-event-set-status cur (quote deleted-in-org))))
>   (with-current-buffer buf (goto-char (point-min)) (while
> (org-caldav-narrow-next-event) (let* ((uid
> (org-caldav-rewrite-uid-in-event)) (md5
> (org-caldav-generate-md5-for-org-entry uid)) (event
> (org-caldav-search-event uid))) (cond ((null event)
> (org-caldav-debug-print (format "Org UID %s: New" uid))
> (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not
> (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print
> (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event
> md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq
> (org-caldav-event-status event) (quote new-in-org))
> (org-caldav-debug-print (format "Org UID %s: Error. Double entry."
> uid)) (push (list uid (quote new-in-org) (quote error:double-entry))
> org-caldav-sync-result)) (t (org-caldav-debug-print (format "Org UID
> %s: Synced" uid)) (org-caldav-event-set-status event (quote
> in-org)))))) (dolist (cur (org-caldav-filter-events nil))
> (org-caldav-debug-print (format "Cal UID %s: Deleted in Org" (car
> cur))) (org-caldav-event-set-status cur (quote deleted-in-org))))
>   org-caldav-update-eventdb-from-org(#<buffer org-caldav-8072Vxl>)
>   (if (and org-caldav-event-list (y-or-n-p "Last sync seems to have
> been aborted. Should I try to resume? ")) nil (setq
> org-caldav-ics-buffer (org-caldav-generate-ics)) (setq
> org-caldav-event-list nil) (setq org-caldav-sync-result nil)
> (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list)
> (org-caldav-event-set-status cur nil))
> (org-caldav-update-eventdb-from-org org-caldav-ics-buffer)
> (org-caldav-update-eventdb-from-cal))
>   (unless (and org-caldav-event-list (y-or-n-p "Last sync seems to
> have been aborted. Should I try to resume? ")) (setq
> org-caldav-ics-buffer (org-caldav-generate-ics)) (setq
> org-caldav-event-list nil) (setq org-caldav-sync-result nil)
> (org-caldav-load-sync-state) (dolist (cur org-caldav-event-list)
> (org-caldav-event-set-status cur nil))
> (org-caldav-update-eventdb-from-org org-caldav-ics-buffer)
> (org-caldav-update-eventdb-from-cal))
>   org-caldav-sync()
>   call-interactively(org-caldav-sync t nil)
>   execute-extended-command(nil)
>   call-interactively(execute-extended-command nil nil)
>
>>> - void-function pop-to-buffer-same-window
>
> This has vanished since my update to Emacs 24.
>
> Sven

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27 17:47         ` Sven Bretfeld
@ 2013-01-27 20:41           ` David Engster
  2013-01-28 10:23             ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: David Engster @ 2013-01-27 20:41 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

Sven Bretfeld writes:
> Hi David and all
>
> I've got it. By try and error I found out that entries like these in an
> org-file cause the problem:
>
> %%(diary-anniversary  6 8 1969) Christian is %d years old

Ah OK. Thanks for looking into this. Those entries apparently produce
events during export but don't seem to get an ID. I'll look into this
issue during the next week, when my sinuses have calmed down a bit...

-David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27 20:41           ` David Engster
@ 2013-01-28 10:23             ` Eric S Fraga
  2013-02-02 15:56               ` David Engster
  0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2013-01-28 10:23 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

David Engster <deng@randomsample.de> writes:

> Sven Bretfeld writes:
>> Hi David and all
>>
>
>> I've got it. By try and error I found out that entries like these in an
>> org-file cause the problem:
>>
>> %%(diary-anniversary  6 8 1969) Christian is %d years old
>
> Ah OK. Thanks for looking into this. Those entries apparently produce
> events during export but don't seem to get an ID. I'll look into this
> issue during the next week, when my sinuses have calmed down a bit...

Yes, this is the same problem I was having when I started using
org-caldav-sync.  I currently have all my sexp based diary entries
commented out so would definitely appreciate getting this working!

Hope you get better soon!

Thanks,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-891-gf52600

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-27 15:07     ` David Engster
  2013-01-27 17:08       ` Sven Bretfeld
@ 2013-01-28 21:14       ` Torsten Wagner
  2013-01-30 10:32         ` Bastien
  1 sibling, 1 reply; 15+ messages in thread
From: Torsten Wagner @ 2013-01-28 21:14 UTC (permalink / raw)
  To: Org-Mode

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

Hi,
@David hope you feel better soon.
On a side note,  I had trouble getting url-dav.el loaded. There was a
version in the system which was favoured all time.
I couldn't find a way to tell emacs to use the local version instead.
I ended up deleting the system version,  possibly making my package
management system upsetting later.
Maybe the readme can cover how to replace the file in a good valid way.

Torsten
On Jan 27, 2013 4:07 PM, "David Engster" <deng@randomsample.de> wrote:

> Sven Bretfeld writes:
> > - progn: Could not find UID emacs207403667799062360.
>
> I'm currently struck with a nasty cold, so I have trouble thinking. But
> this means that it tries to find this ID in your Org files, and it does
> not seem to be there. You can try to go there by calling
>
> M-x org-id-goto
>
> and yank the above ID. Does this get you anywhere?
>
> If not, could you grep through your Org files and see if there's maybe
> an ID which at least is similar? Maybe some special character was
> stripped while putting the event.
>
> Also, the *org-caldav-debug* buffer might contain more information.
>
> > - void-function pop-to-buffer-same-window
> >
> > Could the last one be a function not implemented in my 23 version of
> > Emacs?
>
> Yes. I will have to add some compatibility code for older Emacsen.
>
> -David
>
>

[-- Attachment #2: Type: text/html, Size: 1712 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-28 21:14       ` Torsten Wagner
@ 2013-01-30 10:32         ` Bastien
  2013-02-01 12:08           ` Torsten Wagner
  0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2013-01-30 10:32 UTC (permalink / raw)
  To: Torsten Wagner; +Cc: Org-Mode

Hi Torsten,

Torsten Wagner <torsten.wagner@gmail.com> writes:

> I couldn't find a way to tell emacs to use the local version
> instead.

What about a simple (load "../url-dav.el") ?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-30 10:32         ` Bastien
@ 2013-02-01 12:08           ` Torsten Wagner
  0 siblings, 0 replies; 15+ messages in thread
From: Torsten Wagner @ 2013-02-01 12:08 UTC (permalink / raw)
  To: Bastien; +Cc: Org-Mode

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Hi Bastien,

hmmm I tried but it didn't work. Maybe because the package version of
url-dav was compiled.
I will try again as soon as a update breaks my "solution" ;)

Best

Torsten


On 30 January 2013 11:32, Bastien <bzg@altern.org> wrote:

> Hi Torsten,
>
> Torsten Wagner <torsten.wagner@gmail.com> writes:
>
> > I couldn't find a way to tell emacs to use the local version
> > instead.
>
> What about a simple (load "../url-dav.el") ?
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 1008 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-01-28 10:23             ` Eric S Fraga
@ 2013-02-02 15:56               ` David Engster
  2013-02-03  0:04                 ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: David Engster @ 2013-02-02 15:56 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

Eric S. Fraga writes:
> David Engster <deng@randomsample.de> writes:
>
>> Sven Bretfeld writes:
>>> Hi David and all
>>>
>>
>>> I've got it. By try and error I found out that entries like these in an
>>> org-file cause the problem:
>>>
>>> %%(diary-anniversary  6 8 1969) Christian is %d years old
>>
>> Ah OK. Thanks for looking into this. Those entries apparently produce
>> events during export but don't seem to get an ID. I'll look into this
>> issue during the next week, when my sinuses have calmed down a bit...
>
> Yes, this is the same problem I was having when I started using
> org-caldav-sync.  I currently have all my sexp based diary entries
> commented out so would definitely appreciate getting this working!

OK, I took a shot at dealing with sexp entries. It's a complicated
issue, since s-expressions can be in Org entries or by themselves. I
updated the Readme with a section on how they are handled now. Please
let me know how it works out for you. If you don't want/need sexp-based
entries in your calendar, just set org-icalendar-include-sexps to nil.

-David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-02-02 15:56               ` David Engster
@ 2013-02-03  0:04                 ` Eric S Fraga
  2013-02-03 12:20                   ` David Engster
  0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2013-02-03  0:04 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: Org-Mode

David Engster <deng@randomsample.de> writes:

> OK, I took a shot at dealing with sexp entries. It's a complicated
> issue, since s-expressions can be in Org entries or by themselves. I
> updated the Readme with a section on how they are handled now. Please
> let me know how it works out for you. If you don't want/need sexp-based
> entries in your calendar, just set org-icalendar-include-sexps to nil.

David,

this fails.  See below for debug trace.  When it fails, the buffer
org-caldav-2708bS2 has the converted contents of my test entry with an
sexp:

,----
| BEGIN:VEVENT
| UID:orgsexp-67952239
| DTSTART;VALUE=DATE:19710313
| DTEND;VALUE=DATE:19710314
| RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=03;BYMONTHDAY=13
| SUMMARY:Somebody's birthday (%d years)
| END:VEVENT
`----

The test entry is

#+begin_src org
* Test entries
%%(diary-anniversary 1971 03 13) Somebody's birthday (%d years)
#+end_src

Setting org-icalendar-include-sexps to nil works, by the way.

As an aside, this new version of org-caldav changes point in my diary
file (leaving it at the last entry in the file).  Maybe a save-excursion
somewhere is needed?

Let me know if I can send you any other information.

,----
| Debugger entered--Lisp error: (wrong-type-argument stringp 27276)
|   string-match("^orgsexp-" 27276)
|   (if (string-match "^orgsexp-" uid) nil (org-caldav-generate-md5-for-org-entry uid))
|   (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (if (string-match "^orgsexp-" uid) nil (org-caldav-generate-md5-for-org-entry uid))) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print 1 (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print 1 (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print 1 (format "Org UID %s: Error. Double entry." uid)) (setq org-caldav-sync-result (cons (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result))) (t (org-caldav-debug-print 1 (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org)))))
|   (while (org-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (if (string-match "^orgsexp-" uid) nil (org-caldav-generate-md5-for-org-entry uid))) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print 1 (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print 1 (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print 1 (format "Org UID %s: Error. Double entry." uid)) (setq org-caldav-sync-result (cons (list uid (quote new-in-org) (quote error:double-entry)) org-caldav-sync-result))) (t (org-caldav-debug-print 1 (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org))))))
|   (save-current-buffer (set-buffer buf) (goto-char (point-min)) (while (org-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event)) (md5 (if (string-match "^orgsexp-" uid) nil (org-caldav-generate-md5-for-org-entry uid))) (event (org-caldav-search-event uid))) (cond ((null event) (org-caldav-debug-print 1 (format "Org UID %s: New" uid)) (org-caldav-add-event uid md5 nil nil (quote new-in-org))) ((not (string= md5 (org-caldav-event-md5 event))) (org-caldav-debug-print 1 (format "Org UID %s: Changed" uid)) (org-caldav-event-set-md5 event md5) (org-caldav-event-set-status event (quote changed-in-org))) ((eq (org-caldav-event-status event) (quote new-in-org)) (org-caldav-debug-print 1 (format "Org UID %s: Error. Double entry." uid)) (setq org-caldav-sync-result (cons (list uid ... ...) org-caldav-sync-result))) (t (org-caldav-debug-print 1 (format "Org UID %s: Synced" uid)) (org-caldav-event-set-status event (quote in-org)))))) (progn (let ((--dolist-tail-- (org-caldav-filter-events nil)) cur) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (org-caldav-debug-print 1 (format "Cal UID %s: Deleted in Org" (car cur))) (org-caldav-event-set-status cur (quote deleted-in-org)) (setq --dolist-tail-- (cdr --dolist-tail--))))))
|   org-caldav-update-eventdb-from-org(#<buffer org-caldav-2708ALL>)
`----


Thanks,
eric


-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-898-g005917

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-02-03  0:04                 ` Eric S Fraga
@ 2013-02-03 12:20                   ` David Engster
  2013-02-03 22:31                     ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: David Engster @ 2013-02-03 12:20 UTC (permalink / raw)
  To: Org-Mode

Eric S. Fraga writes:
> David Engster <deng@randomsample.de> writes:
>> OK, I took a shot at dealing with sexp entries. It's a complicated
>> issue, since s-expressions can be in Org entries or by themselves. I
>> updated the Readme with a section on how they are handled now. Please
>> let me know how it works out for you. If you don't want/need sexp-based
>> entries in your calendar, just set org-icalendar-include-sexps to nil.

> this fails.  See below for debug trace.

Thanks for the trace. This should be fixed now.

> As an aside, this new version of org-caldav changes point in my diary
> file (leaving it at the last entry in the file).  Maybe a save-excursion
> somewhere is needed?

Org-caldav does not use the diary file directly. This would rather be a
bug in the icalendar exporter, or maybe in the icalendar package. I'm
not sure how and where exactly these sexp entries are handled.

-David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Problems with org-caldav (wrong-type-argument stringp 47)
  2013-02-03 12:20                   ` David Engster
@ 2013-02-03 22:31                     ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2013-02-03 22:31 UTC (permalink / raw)
  To: Org-Mode

David Engster <deng@randomsample.de> writes:

> Eric S. Fraga writes:
>> David Engster <deng@randomsample.de> writes:
>>> OK, I took a shot at dealing with sexp entries. It's a complicated
>
>>> issue, since s-expressions can be in Org entries or by themselves. I
>>> updated the Readme with a section on how they are handled now. Please
>>> let me know how it works out for you. If you don't want/need sexp-based
>>> entries in your calendar, just set org-icalendar-include-sexps to nil.
>
>> this fails.  See below for debug trace.
>
> Thanks for the trace. This should be fixed now.

Excellent.  My diary sexp entries work!  Thanks.

>> As an aside, this new version of org-caldav changes point in my diary
>> file (leaving it at the last entry in the file).  Maybe a save-excursion
>> somewhere is needed?
>
> Org-caldav does not use the diary file directly. This would rather be a
> bug in the icalendar exporter, or maybe in the icalendar package. I'm
> not sure how and where exactly these sexp entries are handled.

This problem seems to have disappeared.

Thanks again,
eric
-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org 7.9.3e-897-g787a07

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-02-03 22:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-26 14:20 Problems with org-caldav (wrong-type-argument stringp 47) Sven Bretfeld
2013-01-26 17:32 ` David Engster
2013-01-27  2:29   ` Sven Bretfeld
2013-01-27 15:07     ` David Engster
2013-01-27 17:08       ` Sven Bretfeld
2013-01-27 17:47         ` Sven Bretfeld
2013-01-27 20:41           ` David Engster
2013-01-28 10:23             ` Eric S Fraga
2013-02-02 15:56               ` David Engster
2013-02-03  0:04                 ` Eric S Fraga
2013-02-03 12:20                   ` David Engster
2013-02-03 22:31                     ` Eric S Fraga
2013-01-28 21:14       ` Torsten Wagner
2013-01-30 10:32         ` Bastien
2013-02-01 12:08           ` Torsten Wagner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).