[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 6e66e4a 003/118: org-contacts: added
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 6e66e4a 003/118: org-contacts: added custom org-contacts-birthday-format |
Date: |
Fri, 12 Nov 2021 15:36:53 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 6e66e4a769d3bd1fb9ed3b5d6c58114211e8583d
Author: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Commit: Julien Danjou <julien@danjou.info>
org-contacts: added custom org-contacts-birthday-format
Signed-off-by: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
---
org-contacts.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/org-contacts.el b/org-contacts.el
index e8c4807..06137d7 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -59,6 +59,16 @@ If set to nil, all your Org files will be used."
:type 'string
:group 'org-contacts)
+(defcustom org-contacts-birthday-format "Birthday: %l (%Y)"
+ "Format of the anniversary agenda entry. The following replacements are
available:
+
+ %h - Heading name
+ %l - Link to the heading
+ %y - Number of year
+ %Y - Number of year (ordinal)"
+ :type 'string
+ :group 'org-contacts)
+
(defcustom org-contacts-last-read-mail-property "LAST_READ_MAIL"
"Name of the property for contact last read email link storage."
:type 'string
@@ -263,6 +273,7 @@ Format is a string matching the following format
specification:
%Y - Number of year (ordinal)"
(let ((calendar-date-style 'american)
(entry ""))
+ (unless format (setq format org-contacts-birthday-format))
(loop for contact in (org-contacts-filter)
for anniv = (let ((anniv (cdr (assoc-string
(or field
org-contacts-birthday-property)
@@ -272,7 +283,7 @@ Format is a string matching the following format
specification:
(org-time-string-to-absolute anniv))))
;; Use `diary-anniversary' to compute anniversary.
if (and anniv (apply 'diary-anniversary anniv))
- collect (format-spec (or format "Birthday: %l (%Y)")
+ collect (format-spec format
`((?l . ,(org-with-point-at (cadr contact)
(org-store-link nil)))
(?h . ,(car contact))
(?y . ,(- (calendar-extract-year date)
- [elpa] branch scratch/org-contacts-rebased created (now 3f635df), Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6e66e4a 003/118: org-contacts: added custom org-contacts-birthday-format,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 4f5c581 006/118: Fix wanderlust interface for org-contact.el, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased b78a119 005/118: Add docstring for `wl-get-from-header-content'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 4a36f4a 004/118: Merge org-contacts-wl in org-contacts, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 4d5b508 007/118: org-contacts: check that completion-at-point-functions is bound, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ad99d80 001/118: org-contacts: import, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d0caf96 015/118: Replace org-mode-p with usual (eq major-mode 'org-mode) check, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7fcd20b 025/118: contrib/lisp/org-contacts.el: Docstring fixes and small code clean up, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dcd313e 021/118: Tags/properties matcher: Fixed issues with todo-only matches, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 938ca34 019/118: Add missing word to org-contacts y-or-n-p question, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c0f4677 024/118: contrib/lisp/org-contacts.el: Require 'org-agenda., Stefan Monnier, 2021/11/12