org-caldav icon indicating copy to clipboard operation
org-caldav copied to clipboard

Fails with invalid version syntax

Open ericsfraga opened this issue 4 years ago • 0 comments

Having recently upgraded org (from git), I now get the following error message when attempting to sync:

Debugger entered--Lisp error: (error "Invalid version syntax: ‘9.5-dev’")
  error("Invalid version syntax: `%s'" "9.5-dev")
  version-to-list("9.5-dev")
  version<("9.5-dev" "8.3beta")
  org-caldav-generate-ics()

It might be argued that the problem with either with org or with Emacs but it would be good if org-caldav could trap this error and proceed in a reasonable manner?

Edit: I have changed the code to the following which at least lets me continue using org-caldav-sync.

*** org-caldav.el	2021-09-22 11:58:32.537120111 +0100
--- org-caldav.el.orig	2020-06-06 16:17:04.065321070 +0100
***************
*** 1317,1327 ****
      (if (featurep 'ox-icalendar)
  	;; New exporter (Org 8)
  	;; Signature changed in version 8.3
!         (condition-case nil
!             (if (version< org-version "8.3beta")
! 	        (apply 'org-icalendar--combine-files nil orgfiles)
! 	      (apply 'org-icalendar--combine-files orgfiles))
!           (error (apply 'org-icalendar--combine-files orgfiles)))	
        (apply 'org-export-icalendar t orgfiles))
      (find-file-noselect (symbol-value icalendar-file))))
  
--- 1317,1325 ----
      (if (featurep 'ox-icalendar)
  	;; New exporter (Org 8)
  	;; Signature changed in version 8.3
! 	(if (version< org-version "8.3beta")
! 	    (apply 'org-icalendar--combine-files nil orgfiles)
! 	  (apply 'org-icalendar--combine-files orgfiles))
        (apply 'org-export-icalendar t orgfiles))
      (find-file-noselect (symbol-value icalendar-file))))

The change is not an actual solution, of course.

Thank you.

ericsfraga avatar Sep 22 '21 10:09 ericsfraga