From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Sven Bretfeld <sven.bretfeld@gmx.ch>
Cc: Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: Problems with org-caldav (wrong-type-argument stringp 47)
Date: Sun, 3 Feb 2013 10:34:25 +1030 [thread overview]
Message-ID: <87zjzmntyu.fsf@ucl.ac.uk> (raw)
In-Reply-To: 87k3qqlnf6.fsf@engster.org
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
next prev parent reply other threads:[~2013-02-03 0:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjzmntyu.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=sven.bretfeld@gmx.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).