From mboxrd@z Thu Jan 1 00:00:00 1970 From: giles@pexip.com Subject: Re: org-caldav issue: Search failed: ";\\([A-Za-z0-9-]+\\)=" Date: Wed, 30 Jan 2013 19:22:33 +0000 Message-ID: References: <87sj5imzi0.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]:47029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0dFA-0002nK-3Q for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 14:22:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0dF8-0008NT-9A for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 14:22:48 -0500 Received: from plane.gmane.org ([80.91.229.3]:43141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0dF7-0008MT-UP for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 14:22:46 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U0dFN-0005aQ-8S for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 20:23:01 +0100 Received: from 82.69.78.253 ([82.69.78.253]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jan 2013 20:23:01 +0100 Received: from giles by 82.69.78.253 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jan 2013 20:23:01 +0100 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: emacs-orgmode@gnu.org Thanks for the interest. David Engster writes: > Could you please do M-x toggle-debug-on-error before running the sync > and post the resulting backtrace here? Slightly different behaviour this time: first seven events synced fine, number 8 blew up the same way. Debugger entered--Lisp error: (search-failed ";\\([A-Za-z0-9-]+\\)=3D") re-search-forward(";\\([A-Za-z0-9-]+\\)=3D" nil nil) icalendar--read-element(VEVENT nil) icalendar--read-element(VCALENDAR nil) icalendar--read-element(nil nil) (let* ((calendar-date-style (quote european)) (ical-list (icalendar--read= -element nil nil)) (e (car (icalendar--all-events ical-list))) (zone-map (i= calendar--convert-all-timezones ical-list)) (dtstart (icalendar--get-event-= property e (quote DTSTART))) (dtstart-zone (icalendar--find-time-zone (ical= endar--get-event-property-attributes e (quote DTSTART)) zone-map)) (dtstart= -dec (icalendar--decode-isodatetime dtstart nil dtstart-zone)) (start-d (ic= alendar--datetime-to-diary-date dtstart-dec)) (start-t (icalendar--datetime= -to-colontime dtstart-dec)) (dtend (icalendar--get-event-property e (quote = DTEND))) (dtend-zone (icalendar--find-time-zone (icalendar--get-event-prope= rty-attributes e (quote DTEND)) zone-map)) (dtend-dec (icalendar--decode-is= odatetime dtend nil dtend-zone)) (dtend-1-dec (icalendar--decode-isodatetim= e dtend -1 dtend-zone)) end-d end-1-d end-t (summary (icalendar--convert-st= ring-for-import (or (icalendar--get-event-property e (quote SUMMARY)) "No T= itle"))) (description (icalendar--convert-string-for-import (or (icalendar-= -get-event-property e (quote DESCRIPTION)) ""))) (rrule (icalendar--get-eve= nt-property e (quote RRULE))) (rdate (icalendar--get-event-property e (quot= e RDATE))) (duration (icalendar--get-event-property e (quote DURATION)))) (= if (and dtstart (string=3D (cadr (icalendar--get-event-property-attributes = e (quote DTSTART))) "DATE")) (setq start-t nil)) (if duration (progn (let (= (dtend-dec-d (icalendar--add-decoded-times dtstart-dec (icalendar--decode-i= soduration duration))) (dtend-1-dec-d (icalendar--add-decoded-times dtstart= -dec (icalendar--decode-isoduration duration t)))) (if (and dtend-dec (not = (eq dtend-dec dtend-dec-d))) (message "Inconsistent endtime and duration fo= r %s" summary)) (setq dtend-dec dtend-dec-d) (setq dtend-1-dec dtend-1-dec-= d)))) (setq end-d (if dtend-dec (icalendar--datetime-to-diary-date dtend-de= c) start-d)) (setq end-1-d (if dtend-1-dec (icalendar--datetime-to-diary-da= te dtend-1-dec) start-d)) (setq end-t (if (and dtend-dec (not (string=3D (c= adr (icalendar--get-event-property-attributes e ...)) "DATE"))) (icalendar-= -datetime-to-colontime dtend-dec) start-t)) (list start-d start-t (if end-t= end-d end-1-d) end-t summary description)) org-caldav-convert-event() (setq eventdata (org-caldav-convert-event)) (save-current-buffer (set-buffer (org-caldav-get-event uid)) (goto-char (= point-min)) (save-excursion (if (re-search-forward "^SEQUENCE:\\s-*\\([0-9]= +\\)" nil t) (progn (org-caldav-event-set-sequence cur (string-to-number (m= atch-string 1)))))) (setq eventdata (org-caldav-convert-event))) (while --dolist-tail-- (setq cur (car --dolist-tail--)) (setq uid (car cu= r)) (setq org-caldav-sync-result (cons (list uid (org-caldav-event-status c= ur) (quote cal->org)) org-caldav-sync-result)) (setq counter (1+ counter)) = (message "Getting event %d of %d" counter (length events)) (save-current-bu= ffer (set-buffer (org-caldav-get-event uid)) (goto-char (point-min)) (save-= excursion (if (re-search-forward "^SEQUENCE:\\s-*\\([0-9]+\\)" nil t) (prog= n (org-caldav-event-set-sequence cur (string-to-number (match-string 1)))))= ) (setq eventdata (org-caldav-convert-event))) (if (eq (org-caldav-event-st= atus cur) (quote new-in-cal)) (save-current-buffer (set-buffer (find-file-n= oselect org-caldav-inbox)) (org-caldav-debug-print (format "Event UID %s: N= ew in Cal --> Org inbox." uid)) (goto-char (point-max)) (apply (quote org-c= aldav-insert-org-entry) (append eventdata (list uid))) (setq buf (current-b= uffer))) (org-caldav-debug-print (format "Event UID %s: Changed in Cal --> = Org" uid)) (let ((marker (org-id-find (car cur) t))) (if (null marker) (pro= gn (error "Could not find UID %s." (car cur)))) (save-current-buffer (set-b= uffer (marker-buffer marker)) (goto-char (marker-position marker)) (if org-= caldav-backup-file (progn (org-caldav-backup-item))) (if (or (eq org-caldav= -sync-changes-to-org (quote title-only)) (eq org-caldav-sync-changes-to-org= (quote title-and-timestamp))) (progn (org-caldav-change-heading (nth 4 eve= ntdata)))) (if (or (eq org-caldav-sync-changes-to-org (quote timestamp-only= )) (eq org-caldav-sync-changes-to-org (quote title-and-timestamp))) (progn = (org-caldav-change-timestamp (apply ... ...)))) (if (eq org-caldav-sync-cha= nges-to-org (quote all)) (progn (delete-region (org-entry-beginning-positio= n) (org-entry-end-position)) (apply (quote org-caldav-insert-org-entry) (ap= pend eventdata ...)))) (setq buf (current-buffer))))) (org-caldav-event-set= -status cur (quote synced)) (save-current-buffer (set-buffer buf) (org-cald= av-event-set-md5 cur (md5 (buffer-substring-no-properties (org-entry-beginn= ing-position) (org-entry-end-position))))) (setq --dolist-tail-- (cdr --dol= ist-tail--))) (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq cur (car= --dolist-tail--)) (setq uid (car cur)) (setq org-caldav-sync-result (cons = (list uid (org-caldav-event-status cur) (quote cal->org)) org-caldav-sync-r= esult)) (setq counter (1+ counter)) (message "Getting event %d of %d" count= er (length events)) (save-current-buffer (set-buffer (org-caldav-get-event = uid)) (goto-char (point-min)) (save-excursion (if (re-search-forward "^SEQU= ENCE:\\s-*\\([0-9]+\\)" nil t) (progn (org-caldav-event-set-sequence cur (s= tring-to-number ...))))) (setq eventdata (org-caldav-convert-event))) (if (= eq (org-caldav-event-status cur) (quote new-in-cal)) (save-current-buffer (= set-buffer (find-file-noselect org-caldav-inbox)) (org-caldav-debug-print (= format "Event UID %s: New in Cal --> Org inbox." uid)) (goto-char (point-ma= x)) (apply (quote org-caldav-insert-org-entry) (append eventdata (list uid)= )) (setq buf (current-buffer))) (org-caldav-debug-print (format "Event UID = %s: Changed in Cal --> Org" uid)) (let ((marker (org-id-find (car cur) t)))= (if (null marker) (progn (error "Could not find UID %s." (car cur)))) (sav= e-current-buffer (set-buffer (marker-buffer marker)) (goto-char (marker-pos= ition marker)) (if org-caldav-backup-file (progn (org-caldav-backup-item)))= (if (or (eq org-caldav-sync-changes-to-org ...) (eq org-caldav-sync-change= s-to-org ...)) (progn (org-caldav-change-heading ...))) (if (or (eq org-cal= dav-sync-changes-to-org ...) (eq org-caldav-sync-changes-to-org ...)) (prog= n (org-caldav-change-timestamp ...))) (if (eq org-caldav-sync-changes-to-or= g (quote all)) (progn (delete-region ... ...) (apply ... ...))) (setq buf (= current-buffer))))) (org-caldav-event-set-status cur (quote synced)) (save-= current-buffer (set-buffer buf) (org-caldav-event-set-md5 cur (md5 (buffer-= substring-no-properties (org-entry-beginning-position) (org-entry-end-posit= ion))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (progn (let ((--dolist-tail-- events) cur) (while --dolist-tail-- (setq c= ur (car --dolist-tail--)) (setq uid (car cur)) (setq org-caldav-sync-result= (cons (list uid (org-caldav-event-status cur) (quote cal->org)) org-caldav= -sync-result)) (setq counter (1+ counter)) (message "Getting event %d of %d= " counter (length events)) (save-current-buffer (set-buffer (org-caldav-get= -event uid)) (goto-char (point-min)) (save-excursion (if (re-search-forward= "^SEQUENCE:\\s-*\\([0-9]+\\)" nil t) (progn (org-caldav-event-set-sequence= cur ...)))) (setq eventdata (org-caldav-convert-event))) (if (eq (org-cald= av-event-status cur) (quote new-in-cal)) (save-current-buffer (set-buffer (= find-file-noselect org-caldav-inbox)) (org-caldav-debug-print (format "Even= t UID %s: New in Cal --> Org inbox." uid)) (goto-char (point-max)) (apply (= quote org-caldav-insert-org-entry) (append eventdata (list uid))) (setq buf= (current-buffer))) (org-caldav-debug-print (format "Event UID %s: Changed = in Cal --> Org" uid)) (let ((marker (org-id-find ... t))) (if (null marker)= (progn (error "Could not find UID %s." ...))) (save-current-buffer (set-bu= ffer (marker-buffer marker)) (goto-char (marker-position marker)) (if org-c= aldav-backup-file (progn ...)) (if (or ... ...) (progn ...)) (if (or ... ..= .) (progn ...)) (if (eq org-caldav-sync-changes-to-org ...) (progn ... ...)= ) (setq buf (current-buffer))))) (org-caldav-event-set-status cur (quote sy= nced)) (save-current-buffer (set-buffer buf) (org-caldav-event-set-md5 cur = (md5 (buffer-substring-no-properties (org-entry-beginning-position) (org-en= try-end-position))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((events (append (org-caldav-filter-events (quote new-in-cal)) (org-= caldav-filter-events (quote changed-in-cal)))) (url-show-status nil) (count= er 0) eventdata buf uid) (progn (let ((--dolist-tail-- events) cur) (while = --dolist-tail-- (setq cur (car --dolist-tail--)) (setq uid (car cur)) (setq= org-caldav-sync-result (cons (list uid (org-caldav-event-status cur) (quot= e cal->org)) org-caldav-sync-result)) (setq counter (1+ counter)) (message = "Getting event %d of %d" counter (length events)) (save-current-buffer (set= -buffer (org-caldav-get-event uid)) (goto-char (point-min)) (save-excursion= (if (re-search-forward "^SEQUENCE:\\s-*\\([0-9]+\\)" nil t) (progn ...))) = (setq eventdata (org-caldav-convert-event))) (if (eq (org-caldav-event-stat= us cur) (quote new-in-cal)) (save-current-buffer (set-buffer (find-file-nos= elect org-caldav-inbox)) (org-caldav-debug-print (format "Event UID %s: New= in Cal --> Org inbox." uid)) (goto-char (point-max)) (apply (quote org-cal= dav-insert-org-entry) (append eventdata ...)) (setq buf (current-buffer))) = (org-caldav-debug-print (format "Event UID %s: Changed in Cal --> Org" uid)= ) (let ((marker ...)) (if (null marker) (progn ...)) (save-current-buffer (= set-buffer ...) (goto-char ...) (if org-caldav-backup-file ...) (if ... ...= ) (if ... ...) (if ... ...) (setq buf ...)))) (org-caldav-event-set-status = cur (quote synced)) (save-current-buffer (set-buffer buf) (org-caldav-event= -set-md5 cur (md5 (buffer-substring-no-properties ... ...)))) (setq --dolis= t-tail-- (cdr --dolist-tail--)))))) org-caldav-update-events-in-org() org-caldav-sync() call-interactively(org-caldav-sync record nil) command-execute(org-caldav-sync record) execute-extended-command(nil "org-caldav-sync") call-interactively(execute-extended-command nil nil) --=20 Giles Chamberlin