diff options
author | hokomo <hokomo@airmail.cc> | 2022-11-24 18:39:51 +0100 |
---|---|---|
committer | Ulf Jasper <ulf.jasper@web.de> | 2022-11-24 18:59:58 +0100 |
commit | c6c31b2903b82273da2671986a08edb1bda08214 (patch) | |
tree | 579372841950b06e5b72c0e0b125e293a3264193 | |
parent | d34fc7b7aa9d2779ebbada5cecd8bd2806e3e01e (diff) | |
download | emacs-c6c31b2903b82273da2671986a08edb1bda08214.tar.gz |
icalendar.el: Fix parsing of sexp entries (bug#56241)
* lisp/calendar/icalendar.el (icalendar--convert-sexp-to-ical): Use
read-from-string for parsing sexp entries (bug#56241).
Copyright-paperwork-exempt: yes
-rw-r--r-- | lisp/calendar/icalendar.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index cf542939897..55757400406 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1641,9 +1641,11 @@ enumeration, given as a Lisp time value -- used for test purposes." entry-main) ;; regular sexp entry (icalendar--dmsg "diary-sexp %s" entry-main) - (let ((p1 (substring entry-main (match-beginning 1) (match-end 1))) - (p2 (substring entry-main (match-beginning 2) (match-end 2))) - (now (or start (current-time)))) + (let* ((entry-main (substring entry-main 2)) + (res (read-from-string entry-main)) + (p1 (prin1-to-string (car res))) + (p2 (substring entry-main (cdr res))) + (now (or start (current-time)))) (delete nil (mapcar (lambda (offset) |