;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312%\210\313\314\315\316\317DD\320\321\322\311\306\323\324& \210\313\325\315\316\326DD\327\311\306\330\331\332\333\321\334\323\324\335\336&\210\313\337\315\316\340DD\341\321\342\311\306\323\324& \210\313\343\315\316\344DD\345\321\346\311\306\323\324& \210\313\347\315\316\350DD\351\321\316\311\306\323\324& \210\352\353\354\355\356\357\360\361\362\363& \207" [require cl-lib org-compat org-macs ol custom-declare-group org-bbdb-anniversaries nil "Customizations for including anniversaries from BBDB into Agenda." :group org-bbdb custom-declare-variable org-bbdb-default-anniversary-format funcall function #[0 "\300\207" [#1="birthday"] 1 #1#] "Default anniversary class." :type string :require bbdb org-bbdb-general-anniversary-description-after #[0 "\300\207" [7] 1] "When to switch anniversary descriptions to a more general format.\n\nAnniversary descriptions include the point in time, when the\nanniversary appears. This is, in its most general form, just the\ndate of the anniversary. Or more specific terms, like \"today\",\n\"tomorrow\" or \"in n days\" are used to describe the time span.\n\nIf the anniversary happens in less than that number of days, the\nspecific description is used. Otherwise, the general one is\nused." :version "26.1" :package-version (Org . "9.1") integer :safe integerp org-bbdb-anniversary-format-alist #[0 "\300\207" [(("birthday" lambda (name years suffix) (concat "Birthday: [[bbdb:" name "][" name " (" (format "%s" years) suffix ")]]")) ("wedding" lambda (name years suffix) (concat "[[bbdb:" name "][" name "'s " (format "%s" years) suffix " wedding anniversary]]")))] 1] "How different types of anniversaries should be formatted.\nAn alist of elements (STRING . FORMAT) where STRING is the name of an\nanniversary class and format is either:\n1) A format string with the following substitutions (in order):\n - the name of the record containing this anniversary\n - the number of years\n - an ordinal suffix (st, nd, rd, th) for the year\n\n2) A function to be called with three arguments: NAME YEARS SUFFIX\n (string int string) returning a string for the diary or nil.\n\n3) An Emacs Lisp form that should evaluate to a string (or nil) in the\n scope of variables NAME, YEARS and SUFFIX (among others)." (alist :key-type (string :tag "Class") :value-type (function :tag "Function")) org-bbdb-anniversary-field #[0 "\300\207" [anniversary] 1] "The BBDB field which contains anniversaries.\nThe anniversaries are stored in the following format\n\nYYYY-MM-DD Class-or-Format-String\n\nwhere class is one of the customized classes for anniversaries;\nbirthday and wedding are predefined. Format-String can take three\nsubstitutions 1) the name of the record containing this\nanniversary, 2) the number of years, and 3) an ordinal suffix for\nthe year.\n\nMultiple anniversaries can be separated by \\n." symbol org-bbdb-extract-date-fun #[0 "\300\207" [org-bbdb-anniv-extract-date] 1] "How to retrieve `month date year' from the anniversary field.\n\nCustomize if you have already filled your BBDB with dates\ndifferent from YYYY-MM-DD. The function must return a list (month\ndate year)." org-link-set-parameters "bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link] 16) #@40 Store a link to a BBDB database entry. (defalias 'org-bbdb-store-link #[0 "\301=\2054\302 \303!\304\305!\203\305\306\"\202\307\310\"@\311P\312\313\314\315\316\317\320\f&\n\210\266\203\207" [major-mode bbdb-mode bbdb-current-record bbdb-record-name fboundp bbdb-record-getprop company bbdb-record-field organization "bbdb:" org-link-store-props :type "bbdb" :name :company :link :description] 15 (#$ . 3787)]) #@208 Create the export version of a BBDB link specified by PATH or DESC. If exporting to either HTML or LaTeX FORMAT the link will be italicized, in all other cases it is left unchanged. (fn PATH DESC FORMAT _) (defalias 'org-bbdb-export #[1028 "\300\301\"\230\203 \262\302=\203\300\303\"\207\304=\203#\300\305\"\207\306=\203.\300\307\"\207\207" [format "bbdb:%s" html "%s" latex "\\textit{%s}" odt "%s"] 8 (#$ . 4220)]) #@42 Follow a BBDB link to NAME. (fn NAME _) (defalias 'org-bbdb-open #[514 "\302\303!\210?\304\305!\203\306!\202\307!)\207" [debug-on-error inhibit-redisplay require bbdb-com fboundp bbdb-name org-bbdb-open-old org-bbdb-open-new] 4 (#$ . 4719)]) #@13 (fn NAME) (defalias 'org-bbdb-open-old #[257 "\3002s\301\302\303Q\304\"\210\305\306\307\310!!W\203\311\300\304\"\210\312\302\303Q\304\"\210\305\306\307\310!!W\2032\311\300\304\"\210\301\304\"\210\305\306\307\310!!W\203F\311\300\304\"\210\312\304\"\210\305\306\307\310!!W\203Z\311\300\304\"\210\313\304\"\210\306\307\310!!\305U\205r\314\315\310!!\210\316\317!0\207" [exit bbdb-name "\\`" "\\'" nil 0 buffer-size get-buffer "*BBDB*" throw bbdb-company bbdb delete-window get-buffer-window error "No matching BBDB record"] 5 (#$ . 4976)]) #@13 (fn NAME) (defalias 'org-bbdb-open-new #[257 "\3002s\301\302\303Q\304\"\210\305\306\307\310!!W\203\311\300\304\"\210\312\302\303Q\304\"\210\305\306\307\310!!W\2032\311\300\304\"\210\301\304\"\210\305\306\307\310!!W\203F\311\300\304\"\210\312\304\"\210\305\306\307\310!!W\203Z\311\300\304\"\210\313\304\"\210\306\307\310!!\305U\205r\314\315\310!!\210\316\317!0\207" [exit bbdb-search-name "\\`" "\\'" nil 0 buffer-size get-buffer "*BBDB*" throw bbdb-search-organization bbdb delete-window get-buffer-window error "No matching BBDB record"] 5 (#$ . 5532)]) #@161 Convert YYYY-MM-DD to (month date year). Argument TIME-STR is the value retrieved from BBDB. If YYYY- is omitted it will be considered unknown. (fn TIME-STR) (defalias 'org-bbdb-anniv-extract-date #[257 "\300\301\"\211:\205Q\211@A\211:\205O\211@A\211\204)\302!\302!\303E\266\202\202M\211:\203L\211@A\211?\205G\302!\302!\302!E\266\203\266\202\202M\303\266\202\266\202\207" [org-split-string "-" string-to-number nil] 15 (#$ . 6108)]) #@112 Split multiple entries in the BBDB anniversary field. Argument STR is the anniversary field in BBDB. (fn STR) (defalias 'org-bbdb-anniv-split #[257 "\300\301\"\211\203\302O\303\304O!D\202\304D\207" [string-match "[ ]" 0 bbdb-string-trim nil] 7 (#$ . 6572)]) #@91 A hash holding anniversaries extracted from BBDB. The hash table is created on first use. (defvar org-bbdb-anniv-hash nil (#$ . 6848)) #@72 This is non-nil if BBDB has been updated since we last built the hash. (defvar org-bbdb-updated-p t (#$ . 6989)) #@145 Create a hash with anniversaries extracted from BBDB, for fast access. The anniversaries are assumed to be stored `org-bbdb-anniversary-field'. (defalias 'org-bbdb-make-anniv-hash #[0 "\304\305!\304\306!\203 \306\202\307\310\211\211\311!\210\312 \211\203\216\211@\203)\305 \"\202- \"\211\262\203\207\203?\313\314\"\202C\313\314\"\262\203\207\315\211A\262\242!\262\n@!\211@A\211@A\211@A\316D\"\262\317D\320!A@EB#\266 \202EA\266\202\202\266\310\211\207" [org-bbdb-anniv-hash org-bbdb-anniversary-field org-bbdb-extract-date-fun org-bbdb-updated-p fboundp bbdb-record-getprop bbdb-record-xfield bbdb-record-note nil clrhash bbdb-records bbdb-split "\n" org-bbdb-anniv-split gethash puthash bbdb-record-name] 22 (#$ . 7109)]) #@116 Record the fact that BBDB has been updated. This is used by Org to re-create the anniversary hash table. (fn REC) (defalias 'org-bbdb-updated #[257 "\301\211\207" [org-bbdb-updated-p t] 3 (#$ . 7892)]) (add-hook 'bbdb-after-change-hook 'org-bbdb-updated) #@154 Extract anniversaries from BBDB for display in the agenda. When called programmatically, this function expects the `date' variable to be globally bound. (defalias 'org-bbdb-anniversaries #[0 "\305\306!\210\305\307!\210\310!\204\311\312\313\314\315$ \204!\316!\317U\203$\320 \210\n@\nA@\321\n8\322D\"\323\211\211\324U\203m\325U\203m\322\321\326D\"\203m\327!\204m\322\321\326D\"\262\211A\262\242\211\262\203mB\262\202Y\203\363\211A\262\242\211\262\203\363\203q\3218\206\210 \330\f\331#A\206\222\211A@@\323=\203\240\332\202\245@Z@\323=\203\260\333\202\263\334!\335!\203\301#\202\322<\203\314\336!\202\322\337$\340\323\341$\210\203\352\342 C\"\262 \202\356\211C\262 \266\202q\207" [org-bbdb-anniv-hash org-bbdb-updated-p date org-bbdb-default-anniversary-format org-bbdb-anniversary-format-alist require bbdb diary-lib hash-table-p make-hash-table :test equal :size 366 hash-table-count 0 org-bbdb-make-anniv-hash 2 gethash nil 3 1 29 calendar-leap-year-p assoc-string t "unknown" "" diary-ordinal-suffix functionp eval format org-add-props org-bbdb-name append] 18 (#$ . 8156)]) #@93 Return a list of dates in (m d y) format from the given date D to n-1 days hence. (fn D N) (defalias 'org-bbdb-date-list #[514 "\300!\301\302\303\304\305\306!\307\"\310\311%\312\313S\"\"\207" [calendar-absolute-from-gregorian mapcar make-byte-code 257 "\301\300\\!\207" vconcat vector [calendar-gregorian-from-absolute] 4 "\n\n(fn I)" number-sequence 0] 10 (#$ . 9317)]) #@452 Return a string used to incorporate into an agenda anniversary entry. The calculation of the anniversary description string is based on the difference between the anniversary date, given as ANNIV-DATE, and the date on which the entry appears in the agenda, given as AGENDA-DATE. This makes it possible to have different entries for the same event depending on if it occurs in the next few days or far away in the future. (fn AGENDA-DATE ANNIV-DATE) (defalias 'org-bbdb-anniversary-description #[514 "\301!\301!Z\211\302U\203\303\202B\211\304U\203\305\202B\211W\203(\306\307\"\202B@A\211@A\211@A\306\310$\266\203\266\206\207" [org-bbdb-general-anniversary-description-after calendar-absolute-from-gregorian 0 " -- today\\&" 1 " -- tomorrow\\&" format " -- in %d days\\&" " -- %d-%02d-%02d\\&"] 17 (#$ . 9701)]) #@95 Return list of anniversaries for today and the next n-1 days (default n=7). (fn &optional N) (defalias 'org-bbdb-anniversaries-future #[256 "\211\206\301\211\302X\203\303\304!\210\305\"\306\307\310\311\312\313\314\315\316!\317\"\320\321%\"\"\266\202\207" [date 7 0 error "The (optional) argument of `org-bbdb-anniversaries-future' must be positive" org-bbdb-date-list #[771 "\300\301\302\303\304\305\"\306\"\307\310%\"\207" [mapcar make-byte-code 257 "\302\300\301\"\303\304\"\210\305\306\211$\207" vconcat vector [org-bbdb-anniversary-description string-match "]]" replace-match nil] 7 "\n\n(fn X)"] 11 "\n\n(fn AGENDA-DATE D L)"] apply nconc mapcar make-byte-code 257 " \300\302 #)\207" vconcat vector [date org-bbdb-anniversaries] 6 "\n\n(fn D)"] 13 (#$ . 10542)]) #@40 Read a bbdb link with name completion. (defalias 'org-bbdb-complete-link #[0 "\300\301!\210\302\303!\304\305<\203@\202!P\207" [require bbdb-com bbdb-completing-read-record "Name: " "bbdb:" bbdb-record-name] 4 (#$ . 11338)]) #@71 Extract anniversaries from BBDB and convert them to icalendar format. (defalias 'org-bbdb-anniv-export-ical #[0 "\302\303!\210\302\304!\210\305!\204\306\307\310\311\312$ \204!\313!\314U\203$\315 \210\316\317\"\207" [org-bbdb-anniv-hash org-bbdb-updated-p require bbdb diary-lib hash-table-p make-hash-table :test equal :size 366 hash-table-count 0 org-bbdb-make-anniv-hash maphash org-bbdb-format-vevent] 5 (#$ . 11575)]) #@17 (fn KEY RECS) (defalias 'org-bbdb-format-vevent #[514 "\301\211\211A\262\242\211\262\205O\3028\206\262\303\304\305@@A@\306\307\310\nA@\311\"\312#@ @\fA@ A@\313\f!\314A@Q\f& !\210\202\207" [org-bbdb-default-anniversary-format nil 2 princ format "BEGIN:VEVENT\nUID: ANNIV-%4i%02i%02i-%s\nDTSTART:%4i%02i%02i\nSUMMARY:%s\nDESCRIPTION:%s\nCATEGORIES:%s\nRRULE:FREQ=YEARLY\nEND:VEVENT\n" mapconcat identity org-split-string "[^a-zA-Z0-90]+" "-" capitalize " "] 18 (#$ . 12011)]) (provide 'ol-bbdb)