From 48bdf22482a12238be5bc03f0f975c0192e96ddb Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 22 Jun 2009 21:59:21 +0200 Subject: [PATCH] BBDB/iCal anniversaries: Use user-defined format --- lisp/org-bbdb.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index 6d5a36ca7..925c4f90d 100644 --- a/lisp/org-bbdb.el +++ b/lisp/org-bbdb.el @@ -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) -- 2.11.4.GIT