?
Current Path : /usr/share/emacs/24.3/lisp/org/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/org/org-bbdb.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:52 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/org-bbdb.el ;;; in Emacs version 24.3.1 ;;; 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\302\303\304\305\306\307%\210\310\311\312\313\314\315\306\303\316\317& \210\310\320\321\322\314\323\306\303\316\317& \210\310\324\325\326\314\327\306\303\316\317& \210\310\330\331\332\314\333\306\303\316\317& \210\334\335\336\337#\210\340\341\342\"\207" [require org 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 "birthday" "Default anniversary class." :type string :require bbdb org-bbdb-anniversary-format-alist '(("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]]"))) "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 'anniversary "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 'org-bbdb-anniv-extract-date "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)." function org-add-link-type "bbdb" org-bbdb-open org-bbdb-export add-hook org-store-link-functions org-bbdb-store-link] 10) #@40 Store a link to a BBDB database entry. (defalias 'org-bbdb-store-link #[nil "\305=\2054 \306 \307 !\310\311!\203 \311 \303\"\202 \312 \313\"@\314\nP\315\316\317\320\n\321\322\f\323\n&\n\210\f,\207" [major-mode rec name company link bbdb-mode bbdb-current-record bbdb-record-name fboundp bbdb-record-getprop bbdb-record-get-field organization "bbdb:" org-store-link-props :type "bbdb" :name :company :link :description] 11 (#$ . 3013)]) #@183 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. (defalias 'org-bbdb-export #[(path desc format) "\302\303 \"\230\203 \n\304=\203 \302\305\"\207\n\306=\203! \302\307\"\207\n\310=\203, \302\311\"\207\207" [desc path format "bbdb:%s" html "<i>%s</i>" latex "\\textit{%s}" odt "<text:span text:style-name=\"Emphasis\">%s</text:span>"] 4 (#$ . 3464)]) #@29 Follow a BBDB link to NAME. (defalias 'org-bbdb-open #[(name) "\304\305!\210?\306\307\310!\203 \311!\202 \312!*\207" [debug-on-error bbdb-electric-p inhibit-redisplay name require bbdb-com nil fboundp bbdb-name org-bbdb-open-old org-bbdb-open-new] 2 (#$ . 3960)]) (defalias 'org-bbdb-open-old #[(name) "\300\301\215\207" [exit (byte-code "\301\302\303Q\304\"\210\305\306\307\310!!W\203 \311\312\304\"\210\313\302\303Q\304\"\210\305\306\307\310!!W\203. \311\312\304\"\210\301\304\"\210\305\306\307\310!!W\203B \311\312\304\"\210\313\304\"\210\305\306\307\310!!W\203V \311\312\304\"\210\314\304\"\210\306\307\310!!\305U\205n \315\316\310!!\210\317\320!\207" [name bbdb-name "\\`" "\\'" nil 0 buffer-size get-buffer "*BBDB*" throw exit bbdb-company bbdb delete-window get-buffer-window error "No matching BBDB record"] 4)] 2]) (defalias 'org-bbdb-open-new #[(name) "\300\301\215\207" [exit (byte-code "\301\302\303Q\304\"\210\305\306\307\310!!W\203 \311\312\304\"\210\313\302\303Q\304\"\210\305\306\307\310!!W\203. \311\312\304\"\210\301\304\"\210\305\306\307\310!!W\203B \311\312\304\"\210\313\304\"\210\305\306\307\310!!W\203V \311\312\304\"\210\314\304\"\210\306\307\310!!\305U\205n \315\316\310!!\210\317\320!\207" [name bbdb-search-name "\\`" "\\'" nil 0 buffer-size get-buffer "*BBDB*" throw exit bbdb-search-organization bbdb delete-window get-buffer-window error "No matching BBDB record"] 4)] 2]) #@146 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. (defalias 'org-bbdb-anniv-extract-date #[(time-str) "\305\306\"\211@ A@\307 8\211\310=\203! \311\n!\311!\310E\202+ \311!\311\f!\311\n!E,\207" [time-str #1=#:--cl-var-- a b c org-split-string "-" 2 nil string-to-number] 5 (#$ . 5389)]) #@102 Split multiple entries in the BBDB anniversary field. Argument STR is the anniversary field in BBDB. (defalias 'org-bbdb-anniv-split #[(str) "\302\303\"\211\203 \304 O\305 \306O!D\202 \306D)\207" [str pos string-match "[ ]" 0 bbdb-string-trim nil] 6 (#$ . 5783)]) #@91 A hash holding anniversaries extracted from BBDB. The hash table is created on first use. (defvar org-bbdb-anniv-hash nil (#$ . 6061)) #@72 This is non-nil if BBDB has been updated since we last built the hash. (defvar org-bbdb-updated-p t (#$ . 6202)) #@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 #[nil "\306\307!\310\211\211\311\f!\210\312 \310\211\203\223 @\203( \307 \"\202- \313 \"\211\203\212 \203= \314\315\"\202A \314\315\"\203\212 \316\211A@!\n@!\211@A@\3178\320D\f\"\321D\322 !\n\211A@)E B\f#\210,\202B A\211\204 .\310\211\207" [annivs tmp split old-bbdb org-bbdb-anniv-hash rec fboundp bbdb-record-getprop nil clrhash bbdb-records bbdb-record-note bbdb-split "\n" org-bbdb-anniv-split 2 gethash puthash bbdb-record-name --dolist-tail-- org-bbdb-anniversary-field org-bbdb-extract-date-fun #1=#:--cl-var-- m d y x org-bbdb-updated-p] 6 (#$ . 6322)]) #@106 Record the fact that BBDB has been updated. This is used by Org to re-create the anniversary hash table. (defalias 'org-bbdb-updated #[(rec) "\301\211\207" [org-bbdb-updated-p t] 2 (#$ . 7130)]) (add-hook 'bbdb-after-change-hook 'org-bbdb-updated) #@60 Extract anniversaries from BBDB for display in the agenda. (defalias 'org-bbdb-anniversaries #[nil "\306\307!\210\306\310!\210\311!\204 \312\313\314\315\316$ \204! \317!\320U\203$ \321 \210\n@\nA@\322\n8\323\fD\"$\324\211%&\324'\325U\203z \f\326U\203z \323\322\327D\"\203z \330 !\204z \323\322\327D\"''\211A'@\211&\203z &$B$\202c $\203&$\211A$@\211&\203&&\203 \322&8\206\232 ()\331)*\332#A\206\251 )+&A@,&@\324=\203\275 \333\202\302 &@Z-&@\324=\203\320 \334\202\324 \335-!.\336+!\203\351 +,-.#\202 +<\203\366 \337+!\202 \340+,-.$/\341/\324\342,$\210%\203\343%/C\"%\202!/C%.\202 %.\207" [org-bbdb-anniv-hash org-bbdb-updated-p date m d y 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 annivs text rec recs org-bbdb-default-anniversary-format class org-bbdb-anniversary-format-alist form name years suffix tmp] 6 (#$ . 7385)]) #@40 Read a bbdb link with name completion. (defalias 'org-bbdb-complete-link #[nil "\300\301!\210\302\303\304\305!@!P\207" [require bbdb-com "bbdb:" bbdb-record-name bbdb-completing-read-record "Name: "] 4 (#$ . 8511)]) #@71 Extract anniversaries from BBDB and convert them to icalendar format. (defalias 'org-bbdb-anniv-export-ical #[nil "\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 (#$ . 8733)]) (defalias 'org-bbdb-format-vevent #[(key recs) "\305\211\n\211A@\211\205D \306 8\206 \307\310\311 @\f@\fA@\312\313\314 A@\315\"\316# @\f@\fA@ A@\317!\320 A@Q&!\210\202 *\207" [categ rec recs org-bbdb-default-anniversary-format key 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 " "] 14]) (provide 'org-bbdb)