|
@@ -98,7 +98,7 @@
|
|
(require 'org-macs)
|
|
(require 'org-macs)
|
|
(require 'ol)
|
|
(require 'ol)
|
|
|
|
|
|
-;; Declare functions and variables
|
|
|
|
|
|
+;;; Declare functions and variables
|
|
|
|
|
|
(declare-function bbdb "ext:bbdb-com" (string elidep))
|
|
(declare-function bbdb "ext:bbdb-com" (string elidep))
|
|
(declare-function bbdb-company "ext:bbdb-com" (string elidep))
|
|
(declare-function bbdb-company "ext:bbdb-com" (string elidep))
|
|
@@ -126,9 +126,9 @@
|
|
|
|
|
|
(declare-function diary-ordinal-suffix "diary-lib" (n))
|
|
(declare-function diary-ordinal-suffix "diary-lib" (n))
|
|
|
|
|
|
-(with-no-warnings (defvar date)) ;unprefixed, from calendar.el
|
|
|
|
|
|
+(with-no-warnings (defvar date)) ; unprefixed, from calendar.el
|
|
|
|
|
|
-;; Customization
|
|
|
|
|
|
+;;; Customization
|
|
|
|
|
|
(defgroup org-bbdb-anniversaries nil
|
|
(defgroup org-bbdb-anniversaries nil
|
|
"Customizations for including anniversaries from BBDB into Agenda."
|
|
"Customizations for including anniversaries from BBDB into Agenda."
|
|
@@ -221,7 +221,8 @@ date year)."
|
|
:complete #'org-bbdb-complete-link
|
|
:complete #'org-bbdb-complete-link
|
|
:store #'org-bbdb-store-link)
|
|
:store #'org-bbdb-store-link)
|
|
|
|
|
|
-;; Implementation
|
|
|
|
|
|
+;;; Implementation
|
|
|
|
+
|
|
(defun org-bbdb-store-link ()
|
|
(defun org-bbdb-store-link ()
|
|
"Store a link to a BBDB database entry."
|
|
"Store a link to a BBDB database entry."
|
|
(when (eq major-mode 'bbdb-mode)
|
|
(when (eq major-mode 'bbdb-mode)
|
|
@@ -382,7 +383,7 @@ variable to be globally bound."
|
|
(text ())
|
|
(text ())
|
|
rec recs)
|
|
rec recs)
|
|
|
|
|
|
- ;; we don't want to miss people born on Feb. 29th
|
|
|
|
|
|
+ ;; We don't want to miss people born on Feb. 29th
|
|
(when (and (= m 3) (= d 1)
|
|
(when (and (= m 3) (= d 1)
|
|
(not (null (gethash (list 2 29) org-bbdb-anniv-hash)))
|
|
(not (null (gethash (list 2 29) org-bbdb-anniv-hash)))
|
|
(not (calendar-leap-year-p y)))
|
|
(not (calendar-leap-year-p y)))
|
|
@@ -417,8 +418,9 @@ variable to be globally bound."
|
|
))
|
|
))
|
|
text))
|
|
text))
|
|
|
|
|
|
-;;; Return list of anniversaries for today and the next n-1 (default: n=7) days.
|
|
|
|
-;;; This is meant to be used in an org file instead of org-bbdb-anniversaries:
|
|
|
|
|
|
+;;; Return the list of anniversaries for today and the next n-1
|
|
|
|
+;;; (default: n=7) days. This is meant to be used in an org file
|
|
|
|
+;;; instead of org-bbdb-anniversaries:
|
|
;;;
|
|
;;;
|
|
;;; %%(org-bbdb-anniversaries-future)
|
|
;;; %%(org-bbdb-anniversaries-future)
|
|
;;;
|
|
;;;
|
|
@@ -444,7 +446,6 @@ for the same event depending on if it occurs in the next few days
|
|
or far away in the future."
|
|
or far away in the future."
|
|
(let ((delta (- (calendar-absolute-from-gregorian anniv-date)
|
|
(let ((delta (- (calendar-absolute-from-gregorian anniv-date)
|
|
(calendar-absolute-from-gregorian agenda-date))))
|
|
(calendar-absolute-from-gregorian agenda-date))))
|
|
-
|
|
|
|
(cond
|
|
(cond
|
|
((= delta 0) " -- today\\&")
|
|
((= delta 0) " -- today\\&")
|
|
((= delta 1) " -- tomorrow\\&")
|
|
((= delta 1) " -- tomorrow\\&")
|