From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Problems with org-caldav (wrong-type-argument stringp 47) Date: Sun, 3 Feb 2013 10:34:25 +1030 Message-ID: <87zjzmntyu.fsf@ucl.ac.uk> References: <878v7gt49s.fsf@gmx.ch> <87pq0ronno.fsf@engster.org> <87bocbuzmh.fsf@gmx.ch> <87d2wqoea8.fsf@engster.org> <87pq0q5za7.fsf@gmx.ch> <87sj5mtt53.fsf@gmx.ch> <874ni2nysp.fsf@engster.org> <877gmxa9nd.fsf@ucl.ac.uk> <87k3qqlnf6.fsf@engster.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1n4g-0006bO-UG for emacs-orgmode@gnu.org; Sat, 02 Feb 2013 19:04:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1n4e-0006U2-96 for emacs-orgmode@gnu.org; Sat, 02 Feb 2013 19:04:46 -0500 Received: from va3ehsobe010.messaging.microsoft.com ([216.32.180.30]:29092 helo=va3outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1n4e-0006TI-4l for emacs-orgmode@gnu.org; Sat, 02 Feb 2013 19:04:44 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sven Bretfeld Cc: Org-Mode David Engster 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=3DDATE:19710313 | DTEND;VALUE=3DDATE:19710314 | RRULE:FREQ=3DYEARLY;INTERVAL=3D1;BYMONTH=3D03;BYMONTHDAY=3D13 | 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 (o= rg-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 (quo= te new-in-org))) ((not (string=3D md5 (org-caldav-event-md5 event))) (org-c= aldav-debug-print 1 (format "Org UID %s: Changed" uid)) (org-caldav-event-s= et-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-deb= ug-print 1 (format "Org UID %s: Error. Double entry." uid)) (setq org-calda= v-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-u= id-in-event)) (md5 (if (string-match "^orgsexp-" uid) nil (org-caldav-gener= ate-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=3D 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-s= et-status event (quote changed-in-org))) ((eq (org-caldav-event-status even= t) (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-c= aldav-debug-print 1 (format "Org UID %s: Synced" uid)) (org-caldav-event-se= t-status event (quote in-org)))))) | (save-current-buffer (set-buffer buf) (goto-char (point-min)) (while (o= rg-caldav-narrow-next-event) (let* ((uid (org-caldav-rewrite-uid-in-event))= (md5 (if (string-match "^orgsexp-" uid) nil (org-caldav-generate-md5-for-o= rg-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-e= vent uid md5 nil nil (quote new-in-org))) ((not (string=3D 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 eve= nt (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 entr= y." uid)) (setq org-caldav-sync-result (cons (list uid ... ...) org-caldav-= sync-result))) (t (org-caldav-debug-print 1 (format "Org UID %s: Synced" ui= d)) (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 del= eted-in-org)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) | org-caldav-update-eventdb-from-org(#) `---- Thanks, eric --=20 : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3d-898-g005917