Fix org-caldav: url-hexify-string lambda must accept optional allowed-chars arg

url-encode-url calls url-hexify-string with 2 args. Lambda only accepted 1
causing 'Wrong number of arguments' error. Add &optional allowed-chars.
This commit is contained in:
2026-02-25 09:47:45 +01:00
parent 7219b3fac9
commit 95c5c5d14f

View File

@@ -1783,8 +1783,8 @@ current frame."
"Preserve @ in UID path for Baikal CalDAV compatibility."
(cl-letf* ((orig-hexify (symbol-function 'url-hexify-string))
((symbol-function 'url-hexify-string)
(lambda (str)
(replace-regexp-in-string "%40" "@" (funcall orig-hexify str)))))
(lambda (str &optional allowed-chars)
(replace-regexp-in-string "%40" "@" (funcall orig-hexify str allowed-chars)))))
ad-do-it))
;; Fix #2: Some CalDAV events have nil SUMMARY or missing fields, causing