mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
BBDB/iCal anniversaries: Use user-defined format
This commit is contained in:
parent
e7da07cba5
commit
48bdf22482
@ -362,24 +362,24 @@ This is used by Org to re-create the anniversary hash table."
|
||||
(defun org-bbdb-format-vevent (key recs)
|
||||
(let (rec categ)
|
||||
(while (setq rec (pop recs))
|
||||
(setq categ (or (nth 2 rec) org-bbdb-default-anniversary-format))
|
||||
(princ (format "BEGIN:VEVENT
|
||||
UID: ANNIV-%4i%02i%02i-%s
|
||||
DTSTART:%4i%02i%02i
|
||||
SUMMARY:%s\n"
|
||||
(nth 0 rec)
|
||||
(nth 0 key)
|
||||
(nth 1 key)
|
||||
SUMMARY:%s
|
||||
DESCRIPTION:%s
|
||||
CATEGORIES:%s
|
||||
RRULE:FREQ=YEARLY
|
||||
END:VEVENT\n"
|
||||
(nth 0 rec) (nth 0 key) (nth 1 key)
|
||||
(mapconcat 'identity
|
||||
(org-split-string (nth 1 rec) "[^a-zA-Z0-90]+")
|
||||
"-")
|
||||
(nth 0 rec)
|
||||
(nth 0 key)
|
||||
(nth 1 key)
|
||||
(nth 1 rec)))
|
||||
(if (setq categ (nth 2 rec))
|
||||
(princ (format "CATEGORIES:%s\n" (upcase categ))))
|
||||
(princ "RRULE:FREQ=YEARLY
|
||||
END:VEVENT\n"))))
|
||||
(nth 0 rec) (nth 0 key) (nth 1 key)
|
||||
(nth 1 rec)
|
||||
(concat (capitalize categ) " " (nth 1 rec))
|
||||
categ))))
|
||||
(maphash 'org-bbdb-format-vevent org-bbdb-anniv-hash))
|
||||
|
||||
(provide 'org-bbdb)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user