;ELC ;;; compiled by kwzh@churchy.gnu.ai.mit.edu on Mon May 20 12:03:26 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/diary-lib.el ;;; emacs version 19.30.99.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`diary-lib.el' was compiled for Emacs 19.29 or later")) (require (quote calendar)) #@252 Generate the diary window for ARG days starting with the current date. If no argument is provided, the number of days of diary entries is governed by the variable `number-of-diary-entries'. This function is suitable for execution in a `.emacs' file. (defalias 'diary #[(&optional arg) " ! A\f!A\f!; %!7 !5 !H7 \"D!D!*" [substitute-in-file-name diary-file calendar-current-date date d-file file-exists-p file-readable-p list-diary-entries arg prefix-numeric-value vectorp number-of-diary-entries calendar-day-of-week error "Your diary file is not readable!" "You don't have a diary file!"] 6 (#$ . 509) "P"]) #@217 Prepare and display a buffer with diary entries. Searches the file named in `diary-file' for entries that match ARG days starting with the date indicated by the cursor position in the displayed three-month calendar. (defalias 'view-diary-entries #[(arg) " !$\n!$\n!!\"'!'!)" [substitute-in-file-name diary-file d-file file-exists-p file-readable-p list-diary-entries calendar-cursor-to-date t arg error "Diary file is not readable!" "You don't have a diary file!"] 4 (#$ . 1167) "p"]) #@251 Prepare and display buffer of diary entries from an alternative diary file. Prompts for a file name and searches that file for entries that match ARG days starting with the date indicated by the cursor position in the displayed three-month calendar. (defalias 'view-other-diary-entries #[(arg diary-file) " !" [view-diary-entries arg] 2 (#$ . 1685) (list (cond ((null current-prefix-arg) 1) ((listp current-prefix-arg) (car current-prefix-arg)) (t current-prefix-arg)) (setq diary-file (read-file-name "Enter diary file name: " default-directory nil t)))]) #@186 Check the list of holidays for any that occur on DATE. The value returned is a list of strings of relevant holiday descriptions. The holidays are those in the list `calendar-holidays'. (autoload (quote check-calendar-holidays) "holidays" '(#$ . 2251) t) #@127 Form the list of holidays that occur on dates in the calendar window. The holidays are those in the list `calendar-holidays'. (autoload (quote calendar-holiday-list) "holidays" '(#$ . 2512) t) #@49 French calendar equivalent of date diary entry. (autoload (quote diary-french-date) "cal-french" '(#$ . 2711) t) #@48 Mayan calendar equivalent of date diary entry. (autoload (quote diary-mayan-date) "cal-mayan" '(#$ . 2830) t) #@46 ISO calendar equivalent of date diary entry. (autoload (quote diary-iso-date) "cal-iso" '(#$ . 2946) t) #@49 Julian calendar equivalent of date diary entry. (autoload (quote diary-julian-date) "cal-julian" '(#$ . 3056) t) #@47 Astronomical (Julian) day number diary entry. (autoload (quote diary-astro-day-number) "cal-julian" '(#$ . 3175) t) #@50 Chinese calendar equivalent of date diary entry. (autoload (quote diary-chinese-date) "cal-china" '(#$ . 3297) t) #@50 Islamic calendar equivalent of date diary entry. (autoload (quote diary-islamic-date) "cal-islam" '(#$ . 3417) t) #@75 Add any Islamic date entries from the diary file to `diary-entries-list'. (autoload (quote list-islamic-diary-entries) "cal-islam" '(#$ . 3537) t) #@72 Mark days in the calendar window that have Islamic date diary entries. (autoload (quote mark-islamic-diary-entries) "cal-islam" '(#$ . 3690) t) #@76 Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR. (autoload (quote mark-islamic-calendar-date-pattern) "cal-islam" '(#$ . 3840) t) #@49 Hebrew calendar equivalent of date diary entry. (autoload (quote diary-hebrew-date) "cal-hebrew" '(#$ . 4002) t) #@25 Omer count diary entry. (autoload (quote diary-omer) "cal-hebrew" '(#$ . 4121) t) #@76 Yahrzeit diary entry--entry applies if date is yahrzeit or the day before. (autoload (quote diary-yahrzeit) "cal-hebrew" '(#$ . 4209) t) #@59 Parasha diary entry--entry applies if date is a Saturday. (autoload (quote diary-parasha) "cal-hebrew" '(#$ . 4352) t) #@26 Rosh Hodesh diary entry. (autoload (quote diary-rosh-hodesh) "cal-hebrew" '(#$ . 4477) t) #@74 Add any Hebrew date entries from the diary file to `diary-entries-list'. (autoload (quote list-hebrew-diary-entries) "cal-hebrew" '(#$ . 4573) t) #@71 Mark days in the calendar window that have Hebrew date diary entries. (autoload (quote mark-hebrew-diary-entries) "cal-hebrew" '(#$ . 4725) t) #@75 Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR. (autoload (quote mark-hebrew-calendar-date-pattern) "cal-hebrew" '(#$ . 4874) t) #@49 Coptic calendar equivalent of date diary entry. (autoload (quote diary-coptic-date) "cal-coptic" '(#$ . 5035) t) #@51 Ethiopic calendar equivalent of date diary entry. (autoload (quote diary-ethiopic-date) "cal-coptic" '(#$ . 5154) t) #@50 Persian calendar equivalent of date diary entry. (autoload (quote diary-persian-date) "cal-persia" '(#$ . 5277) t) #@26 Moon phases diary entry. (autoload (quote diary-phases-of-moon) "lunar" '(#$ . 5398) t) #@52 Local time of sunrise and sunset as a diary entry. (autoload (quote diary-sunrise-sunset) "solar" '(#$ . 5492) t) #@124 Local time of candle lighting diary entry--applies if date is a Friday. No diary entry if there is no sunset on that date. (autoload (quote diary-sabbath-candles) "solar" '(#$ . 5613) t) #@180 The syntax table used when parsing dates in the diary file. It is the standard syntax table used in Fundamental mode, but with the syntax of `*' changed to be a word constituent. (defvar diary-syntax-table (byte-code " !" [copy-syntax-table standard-syntax-table] 2) (#$ . 5807)) (modify-syntax-entry 42 "w" diary-syntax-table) #@1548 Create and display a buffer containing the relevant lines in diary-file. The arguments are DATE and NUMBER; the entries selected are those for NUMBER days starting with date DATE. The other entries are hidden using selective display. Returns a list of all relevant diary entries found, if any, in order by date. The list entries have the form ((month day year) string). If the variable `diary-list-include-blanks' is t, this list includes a dummy diary entry (consisting of the empty string) for a date with no diary entries. After the list is prepared, the hooks `nongregorian-diary-listing-hook', `list-diary-entries-hook', `diary-display-hook', and `diary-hook' are run. These hooks have the following distinct roles: `nongregorian-diary-listing-hook' can cull dates from the diary and each included file. Usually used for Hebrew or Islamic diary entries in files. Applied to *each* file. `list-diary-entries-hook' adds or manipulates diary entries from external sources. Used, for example, to include diary entries from other files or to sort the diary entries. Invoked *once* only, before the display hook is run. `diary-display-hook' does the actual display of information. If this is nil, simple-diary-display will be used. Use add-hook to set this to fancy-diary-display, if desired. If you want no diary display, use add-hook to set this to ignore. `diary-hook' is run last. This can be used for an appointment notification function. (defalias 'list-diary-entries #[(date number) " W\n\n!\n! ! !,1 \"q) !׎ !dSb!bu!eb!o!ed%& &T&Y|'\n@)\nA@)\nAA@)\n!)*+,--@@-@A-@/-@@.\n!\n!OR4,!,!O7,!P,+!P+*!:\f*!P Q*@/A#BCDebEC#.EFG#Hh\"WHh\"hށI!hJ!+)`KLFM!`KEсN$ށI!E#J!K`%O\nPL`\"\"*+. -A-)QR\nDC\"S\nAA@)ST\n@),\nA@)+\nAA@)*+,SU_\\V,NVSV,W_X\\ZV**WUJ*U?J*YU)SVTVV-TZ_\\TW\\T[\\TY\\*T!)-z)[!,eb\\]^\"_\\_!` \\a!." [0 number date original-date nil old-diary-syntax-table diary-entries-list calendar-date-string date-string substitute-in-file-name diary-file d-file message "Preparing diary..." find-buffer-visiting diary-buffer find-file-noselect t selective-display selective-display-ellipses syntax-table set-syntax-table diary-syntax-table ((set-syntax-table old-diary-syntax-table)) buffer-modified-p regexp-quote diary-nonmarking-symbol mark diary-modified buffer-read-only looking-at " \\|\n" 1 insert-string " " subst-char-in-region 10 13 i diary-date-forms list-sexp-diary-entries entry-found year day month d backup date-form calendar-day-name "\\|" 3 ".?" dayname "\\*\\|" calendar-month-name monthname "\\*\\|0*" int-to-string abbreviated-calendar-year 100 "" "\\(\\`\\| \\|\n\\)" "?\\(" mapconcat eval "\\)\\(" "\\)" regexp case-fold-search re-search-forward re-search-backward "\\<" char-equal " \\| " backward-char date-start entry-start " \\|\n\\|\\`" 2 add-to-diary-list buffer-substring-no-properties diary-list-include-blanks append calendar-gregorian-from-absolute prior-years 31 day-of-year 4 23 400 365 set-buffer-modified-p run-hooks nongregorian-diary-listing-hook list-diary-entries-hook diary-display-hook simple-diary-display diary-hook] 8 (#$ . 6146)]) #@496 Include the diary entries from other diary files with those of diary-file. This function is suitable for use in `list-diary-entries-hook'; it enables you to use shared diary files together with your own. The files included are specified in the diaryfile by lines of this form: #include "filename" This is recursive; that is, #include directives in diary files thus included are obeyed. You can change the `#include' to some other string by changing the variable `diary-include-string'. (defalias 'include-other-diary-files #[nil "eb !Q#gɔɕ\"!\f !V!Fӎ\"\")c \"!c \"!-eb" [re-search-forward "\\(\\`\\| \\|\n\\)" regexp-quote diary-include-string " \"\\([^\"]*\\)\"" nil t substitute-in-file-name buffer-substring-no-properties 2 include-other-diary-files ignore diary-hook diary-display-hook list-diary-entries-hook diary-list-include-blanks diary-file file-exists-p file-readable-p ((byte-code "\n!!" [kill-buffer find-buffer-visiting diary-file] 3)) append diary-entries-list list-diary-entries original-date number beep message "Can't read included diary file %s" sleep-for "Can't find included diary file %s"] 5 (#$ . 9739)]) #@73 Display the diary buffer if there are any relevant entries or holidays. (defalias 'simple-diary-display #[nil "\n! ǂP ##\f 3 As @A@Șs\fG XD\f\"!q! #ceb!!\" ݂ #R!!!!*" [holidays-in-diary-buffer check-calendar-holidays original-date holiday-list format "No diary entries for %s %s" date-string ":" "" mapconcat identity "; " msg diary-entries-list frame-width message "%s" get-buffer-create holiday-buffer nil buffer-read-only calendar-set-mode-line erase-buffer "\n" set-buffer-modified-p t display-buffer "No diary entries for %s" "Diary for " ": " find-buffer-visiting d-file "Preparing diary...done"] 8 (#$ . 10959)]) #@148 Prepare a diary buffer with relevant entries in a fancy, noneditable form. This function is provided for optional use as the `diary-display-hook'. (defalias 'fancy-diary-display #[nil "\n!!q ed%\n!\f!*4A@A@Ϙ=!LׂMP##G Xg\" !q!! #ceb!! !\"* q!鉉E*+,-*-@@\"-@@*<,,+\"+EC*C\"<*!,<*!+<+_,\\\\\\5T,5+)<,+67 *<+_,\\\\\\5T,5+)*!:;k*;@@\"b:;@A\":;A;M:*=`eUzς{=ci?@؁A=B?C\"P#cǁB?@\\D\"DZ,-@A@GW-@A@DZ-A--!eb!E!݁F!)" [find-buffer-visiting substitute-in-file-name diary-file buffer-modified-p diary-modified subst-char-in-region 13 10 t nil selective-display kill-local-variable mode-line-format set-buffer-modified-p diary-entries-list "" holidays-in-diary-buffer check-calendar-holidays original-date holiday-list format "No diary entries for %s %s" date-string ":" mapconcat identity "; " msg frame-width message "%s" get-buffer-create holiday-buffer buffer-read-only calendar-set-mode-line erase-buffer "\n" display-buffer "No diary entries for %s" make-fancy-diary-buffer 1 0 date holiday-list-last-year holiday-list-last-month entry-list calendar-date-equal calendar-date-compare calendar-last-day-of-month extract-calendar-month extract-calendar-year 12 -1 macro-y displayed-year displayed-month calendar-holiday-list calendar-date-string d h append date-holiday-list ": " l longest #[(x) " GW\n G " [longest x] 2] make-string 32 61 fancy-diary-buffer "Preparing diary...done"] 8 (#$ . 11686)]) #@51 Create and return the initial fancy diary buffer. (defalias 'make-fancy-diary-buffer #[nil " !q!! ! !)" [get-buffer-create fancy-diary-buffer nil buffer-read-only make-local-variable mode-line-format calendar-set-mode-line "Diary Entries" erase-buffer set-buffer-modified-p t get-buffer] 2 (#$ . 13376)]) #@402 Print a hard copy of the diary display. If the simple diary display is being used, prepare a temp buffer with the visible lines of the diary buffer, add a heading line composed from the mode line, print the temp buffer, and destroy it. If the fancy diary display is being used, just print the buffer. The hooks given by the variable `print-diary-entries-hook' are called to do the actual printing. (defalias 'print-diary-entries #[nil "\n!!\n!q!)!!{!\f q;6ςC\"ҔҕO\f ed# q#_!Peb\f\fG\"ٱ! !+~!)" [bufferp get-buffer fancy-diary-buffer run-hooks print-diary-entries-hook find-buffer-visiting substitute-in-file-name diary-file diary-buffer get-buffer-create "*Printable Diary Entries*" nil heading temp-buffer mode-line-format "All Diary Entries" string-match "^-*\\([^-].*[^-]\\)-*$" 1 copy-to-buffer re-search-forward " .*$" t replace-match "" "\n" make-string 61 kill-buffer error "You don't have a diary buffer!"] 6 (#$ . 13708) nil]) #@211 Show all of the diary entries in the diary file. This function gets rid of the selective display of the diary file so that all entries, not just some, are visible. If there is no diary buffer, one is created. (defalias 'show-all-diary-entries #[nil " !U\n!U\n!O\n!#'\n\"q  \fed%!p! !,X!X!)" [substitute-in-file-name diary-file d-file file-exists-p file-readable-p find-buffer-visiting diary-buffer find-file-noselect t nil buffer-modified-p diary-modified buffer-read-only subst-char-in-region 13 10 selective-display make-local-variable mode-line-format default-mode-line-format display-buffer set-buffer-modified-p error "Your diary file is not readable!" "You don't have a diary file!"] 7 (#$ . 14734) nil]) #@294 Convert an STRING-ARRAY, an array of strings to a pattern. The pattern will match any of the strings, either entirely or abbreviated to three characters. An abbreviated form will match with or without a period; If the optional FULLNAME is t, abbreviations will not match, just the full name. (defalias 'diary-name-pattern #[(string-array &optional fullname) "\fGS TY5 \f H'0\f HOQR) )" ["" pattern -1 i string-array "\\|" fullname 0 3 ".?"] 7 (#$ . 15510)]) #@58 True during the marking of diary entries, nil otherwise. (defvar marking-diary-entries nil (#$ . 16010)) #@72 True during the marking of diary entries, if current entry is marking. (defvar marking-diary-entry nil (#$ . 16121)) #@243 Mark days in the calendar window that have diary entries. Each entry in the diary file visible in the calendar window is marked. After the entries are marked, the hooks `nongregorian-diary-marking-hook' and `mark-diary-entries-hook' are run. (defalias 'mark-diary-entries #[nil " !E !E !;! \"q    !@@ҚH@AK@!!PG>GZU?\\>GZ!!U?!\\!>GZ\"\"U?\"\\\">GZ##U?#\\#>GZ$$U?$\\$#Q*+eb*#\f\".!!!\"/#.##\"/!2\"C\"\"\"D!3$T$$\"4^4GU6 8AA@)94!9_\\;9ZV;Z9;ZV;\\;*4!=.@.AO!BC#\"A!//D2@/AO!BEF#\"A2G23=#.A.3H IJK\" !ȁL!+LMN!LMO!*" [t mark-diary-entries-in-calendar substitute-in-file-name diary-file marking-diary-entries d-file file-exists-p file-readable-p message "Marking diary entries..." find-file-noselect diary-date-forms nil old-diary-syntax-table d syntax-table set-syntax-table diary-syntax-table backup date-form diary-name-pattern calendar-day-name-array dayname calendar-month-name-array "\\|\\*" monthname "[0-9]+\\|\\*" month day year l d-name-pos 2 m-name-pos d-pos m-pos y-pos "\\(\\`\\| \\|\n\\)\\(" mapconcat eval "\\)\\(" "\\)" regexp case-fold-search re-search-forward buffer-substring-no-properties dd-name mm-name string-to-int "" mm dd y-str 0 abbreviated-calendar-year calendar-current-date date current-y 100 y 50 yy mark-calendar-days-named assoc capitalize 3 calendar-make-alist (lambda (x) (substring x 0 3)) "*" 1 (lambda (x) (substring x 0 3)) mark-calendar-date-pattern mark-sexp-diary-entries run-hooks nongregorian-diary-marking-hook mark-diary-entries-hook "Marking diary entries...done" error "Your diary file is not readable!" "You don't have a diary file!"] 8 (#$ . 16245) nil]) #@222 Mark days in the calendar window that have sexp diary entries. Each entry in the diary file (or included files) visible in the calendar window is marked. See the documentation for the function `list-sexp-diary-entries'. (defalias 'mark-sexp-diary-entries #[nil " !\n! !\n!ư \n \f q \n)\n_ \\\\ЦT Х\n) \nEAA@)S@)A@)AA@)S_\\V_\\ޥZܦUU?U)T-_\\ܥ\\[\\\\* \n_ \\\\ЦT Х\n) \nU#ܦUU?U)#(SH*\nEAA@)S@)A@)AA@)S_\\V_\\ޥZܦUU?U)T-_\\ܥ\\[\\\\*\feb#}h\"))!`ȉ,-./0 0`\"/!`,)uh\" h\"!!.P`-#!3#$!-`\"..\"P.ߔI> S\fTYx/.!#U!!U.." [regexp-quote sexp-diary-entry-symbol sexp-mark "\\(\\`\\| \\|\n\\)\\(" "(\\)\\|\\(" diary-nonmarking-symbol "(diary-remind\\)" s-entry nil m y first-date last-date calendar-buffer displayed-month displayed-year 12 -2 macro-y 1 date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 29 [31 28 31 30 31 30 31 31 30 31 30 31] re-search-forward t char-equal 40 marking-diary-entry re-search-backward "(" line-start entry-start entry sexp sexp-start forward-sexp buffer-substring-no-properties " \\|\n\\|\\`" 13 looking-at " \\| " backward-char "" " \\|\n" string-match "[ ]" diary-sexp-entry calendar-gregorian-from-absolute mark-visible-calendar-date] 7 (#$ . 18234)]) #@503 Mark the diary entries from other diary files with those of the diary file. This function is suitable for use as the `mark-diary-entries-hook'; it enables you to use shared diary files together with your own. The files included are specified in the diary-file by lines of this form: #include "filename" This is recursive; that is, #include directives in diary files thus included are obeyed. You can change the `#include' to some other string by changing the variable `diary-include-string'. (defalias 'mark-included-diary-files #[nil "eb !Q#Yɔɕ\"! \f\f!H\f!8 \f!!U \f\"!U \f\"!*eb" [re-search-forward "\\(\\`\\| \\|\n\\)" regexp-quote diary-include-string " \"\\([^\"]*\\)\"" nil t substitute-in-file-name buffer-substring-no-properties 2 mark-included-diary-files mark-diary-entries-hook diary-file file-exists-p file-readable-p mark-diary-entries kill-buffer find-buffer-visiting beep message "Can't read included diary file %s" sleep-for "Can't find included diary file %s"] 4 (#$ . 19865)]) #@126 Mark all dates in the calendar window that are day DAYNAME of the week. 0 means all Sundays, 1 means all Mondays, and so on. (defalias 'mark-calendar-days-named #[(dayname) "q \n \nÉ _\\\\\\ ʦT ʥ)_ \\\\ ʦT  ʥ) $AA@)S@)A@)AA@)\fS_\\V_\\ڥZئUܦU?ݦU)T-_\\إ\\ܥ[\\ݥ\\*$AA@)S@)A@)AA@)\fS_\\VP_\\ڥZئUGܦU?GݦU)PT-_\\إ\\ܥ[\\ݥ\\*\f X~\f!!\f\\k." [calendar-buffer displayed-month displayed-year nil day last-day succ-year succ-month prev-year prev-month 12 -1 1 macro-y -2 calendar-nth-named-day dayname date prior-years month year 31 day-of-year 2 4 23 10 0 100 400 365 mark-visible-calendar-date calendar-gregorian-from-absolute 7] 7 (#$ . 20934)]) #@115 Mark all dates in the calendar window that conform to MONTH/DAY/YEAR. A value of 0 in any position is a wildcard. (defalias 'mark-calendar-date-pattern #[(month day year) "q \n _\f\\\\ŦTť)  T YN\f \f % _\f\\\\\\ŦTť)," [calendar-buffer displayed-month displayed-year y m 12 -2 macro-y -1 i 2 mark-calendar-month month day year 1] 7 (#$ . 21831)]) #@135 Mark dates in the MONTH/YEAR that conform to pattern P-MONTH/P_DAY/P-YEAR. A value of 0 in any position of the pattern is a wildcard. (defalias 'mark-calendar-month #[(month year p-month p-day p-year) " U\nU$\f\nU$ Uy\nU$\f\nUy Us\fUW\fȦUO\fɦU?O\fʦU)W˂[SH*TYq\fE!-) \fE!" [month p-month p-year 0 year p-day i 2 4 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] mark-visible-calendar-date] 5 (#$ . 22230)]) #@48 Sort the list of diary entries by time of day. (defalias 'sort-diary-entries #[nil " \"" [sort diary-entries-list diary-entry-compare] 3 (#$ . 22709)]) #@37 Returns t if E1 is earlier than E2. (defalias 'diary-entry-compare #[(e1 e2) " \n\" @\n@\" A@!\nA@!W" [calendar-date-compare e1 e2 calendar-date-equal diary-entry-time] 3 (#$ . 22872)]) #@249 Time at the beginning of the string S in a military-style integer. For example, returns 1325 for 1:25pm. Returns -9999 if no time is recognized. The recognized forms are XXXX or X:XX or XX:XX (military time), XXam or XXpm, and XX:XXam or XX:XXpm. (defalias 'diary-entry-time #[(s) "\n\"\nĔĕO!_\nƔƕO!\\\n\"@\nĔĕO!Ȧ_\nƔƕOɘ=ʂ>\\\n\"n\nĔĕO!Ȧ_\nƔƕO!\\\n͔͕Oɘkʂl\\·" [string-match "^[ ]*\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s string-to-int 1 100 2 "^[ ]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" 12 "a" 0 1200 "^[ ]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" 3 -9999] 5 (#$ . 23076)]) #@7952 Add sexp entries for DATE from the diary file to `diary-entries-list'. Also, Make them visible in the diary file. Returns t if any entries were found. Sexp diary entries must be prefaced by a `sexp-diary-entry-symbol' (normally `%%'). The form of a sexp diary entry is %%(SEXP) ENTRY Both ENTRY and DATE are globally available when the SEXP is evaluated. If the SEXP yields the value nil, the diary entry does not apply. If it yields a non-nil value, ENTRY will be taken to apply to DATE; if the non-nil value is a string, that string will be the diary entry in the fancy diary display. For example, the following diary entry will apply to the 21st of the month if it is a weekday and the Friday before if the 21st is on a weekend: &%%(let ((dayname (calendar-day-of-week date)) (day (extract-calendar-day date))) (or (and (= day 21) (memq dayname '(1 2 3 4 5))) (and (memq day '(19 20)) (= dayname 5))) ) UIUC pay checks deposited A number of built-in functions are available for this type of diary entry: %%(diary-date MONTH DAY YEAR) text Entry applies if date is MONTH, DAY, YEAR if `european-calendar-style' is nil, and DAY, MONTH, YEAR if `european-calendar-style' is t. DAY, MONTH, and YEAR can be lists of integers, the constant t, or an integer. The constant t means all values. %%(diary-float MONTH DAYNAME N) text Entry will appear on the Nth DAYNAME of MONTH. (DAYNAME=0 means Sunday, 1 means Monday, and so on; if N is negative it counts backward from the end of the month. MONTH can be a list of months, a single month, or t to specify all months. %%(diary-block M1 D1 Y1 M2 D2 Y2) text Entry will appear on dates between M1/D1/Y1 and M2/D2/Y2, inclusive. (If `european-calendar-style' is t, the order of the parameters should be changed to D1, M1, Y1, D2, M2, Y2.) %%(diary-anniversary MONTH DAY YEAR) text Entry will appear on anniversary dates of MONTH DAY, YEAR. (If `european-calendar-style' is t, the order of the parameters should be changed to DAY, MONTH, YEAR.) Text can contain %d or %d%s; %d will be replaced by the number of years since the MONTH DAY, YEAR and %s will be replaced by the ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. The anniversary of February 29 is considered to be March 1 in a non-leap year. %%(diary-cyclic N MONTH DAY YEAR) text Entry will appear every N days, starting MONTH DAY, YEAR. (If `european-calendar-style' is t, the order of the parameters should be changed to N, DAY, MONTH, YEAR.) Text can contain %d or %d%s; %d will be replaced by the number of repetitions since the MONTH DAY, YEAR and %s will be replaced by the ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. %%(diary-remind SEXP DAYS &optional MARKING) text Entry is a reminder for diary sexp SEXP. DAYS is either a single number or a list of numbers indicating the number(s) of days before the event that the warning(s) should occur. If the current date is (one of) DAYS before the event indicated by EXPR, then a suitable message (as specified by `diary-remind-message') appears. In addition to the reminders beforehand, the diary entry also appears on the date itself. If optional MARKING is non-nil then the *reminders* are marked on the calendar. Marking of reminders is independent of whether the entry *itself* is a marking or nonmarking one. %%(diary-day-of-year) Diary entries giving the day of the year and the number of days remaining in the year will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-iso-date) Diary entries giving the corresponding ISO commercial date will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-french-date) Diary entries giving the corresponding French Revolutionary date will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-islamic-date) Diary entries giving the corresponding Islamic date will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-hebrew-date) Diary entries giving the corresponding Hebrew date will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-astro-day-number) Diary entries giving the corresponding astronomical (Julian) day number will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-julian-date) Diary entries giving the corresponding Julian date will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-sunrise-sunset) Diary entries giving the local times of sunrise and sunset will be made every day. Note that since there is no text, it makes sense only if the fancy diary display is used. Floating point required. %%(diary-phases-of-moon) Diary entries giving the times of the phases of the moon will be when appropriate. Note that since there is no text, it makes sense only if the fancy diary display is used. Floating point required. %%(diary-yahrzeit MONTH DAY YEAR) text Text is assumed to be the name of the person; the date is the date of death on the *civil* calendar. The diary entry will appear on the proper Hebrew-date anniversary and on the day before. (If `european-calendar-style' is t, the order of the parameters should be changed to DAY, MONTH, YEAR.) %%(diary-rosh-hodesh) Diary entries will be made on the dates of Rosh Hodesh on the Hebrew calendar. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-parasha) Diary entries giving the weekly parasha will be made on every Saturday. Note that since there is no text, it makes sense only if the fancy diary display is used. %%(diary-omer) Diary entries giving the omer count will be made every day from Passover to Shavuot. Note that since there is no text, it makes sense only if the fancy diary display is used. Marking these entries is *extremely* time consuming, so these entries are best if they are nonmarking. (defalias 'list-sexp-diary-entries #[(date) " ! !\n\fǰ\neb#!`ɉ `\"!`)uh\"Wh\"g!g!`#!#p!`\"\"I##$`%#$\"\n$\n.\n," [regexp-quote diary-nonmarking-symbol mark sexp-diary-entry-symbol sexp-mark "\\(\\`\\| \\|\n\\)" "?" "(" s-entry nil entry-found re-search-forward t backward-char 1 line-start entry-start entry sexp sexp-start forward-sexp buffer-substring-no-properties re-search-backward " \\|\n\\|\\`" char-equal 13 10 looking-at " \\| " "" " \\|\n" string-match "[ ]" 0 diary-sexp-entry date diary-entry subst-char-in-region add-to-diary-list] 7 (#$ . 23734)]) #@38 Process a SEXP diary ENTRY for DATE. (defalias 'diary-sexp-entry #[(sexp entry date) " !@!)ȏ ;  ' '\n)" [calendar-debug-sexp t stack-trace-on-error eval read-from-string sexp nil (byte-code "\n!@!" [eval read-from-string sexp] 3) ((error (byte-code " Š`}eb#\fT\f+ \n$!" [beep message "Bad sexp at line %d in %s: %s" 1 lines re-search-forward "\n\\| " nil t diary-file sexp sleep-for 2] 6))) result entry] 4 (#$ . 32403)]) #@279 Specific date(s) diary entry. Entry applies if date is MONTH, DAY, YEAR if `european-calendar-style' is nil, and DAY, MONTH, YEAR if `european-calendar-style' is t. DAY, MONTH, and YEAR can be lists of integers, the constant t, or an integer. The constant t means all values. (defalias 'diary-date #[(month day year) " \n\n  @) AA@) A@) <8 >E E =}\f^\f^\f=}\n{\n{\n=} -" [european-calendar-style month day dd mm date m y d t year entry] 3 (#$ . 32888)]) #@211 Block diary entry. Entry applies if date is between two dates. Order of the parameters is M1, D1, Y1, M2, D2, Y2 `european-calendar-style' is nil, and D1, M1, Y1, D2, M2, Y2 if `european-calendar-style' is t. (defalias 'diary-block #[(m1 d1 y1 m2 d2 y2) " \n E\n EAA@)S\f@)\fA@)\fAA@)S_\\\nVv\n_\\ΥZ\n̦UmЦU?mѦU)v\nT\n\n- _\\ ̥\\ Х[\\ ѥ\\*EEAA@)S\f@)\fA@)\fAA@)S_\\\nV\n_\\ΥZ\n̦UЦU?ѦU)\nT\n\n- _\\ ̥\\ Х[\\ ѥ\\*\fAA@)S\f@)\fA@)\fAA@)S_\\\nV\n_\\ΥZ\n̦U{ЦU?{ѦU)\nT\n\n- _\\ ̥\\ Х[\\ ѥ\\*XX+" [european-calendar-style d1 m1 y1 date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 d2 m2 y2 d date2 date1 entry] 8 (#$ . 33437)]) #@266 Floating diary entry--entry applies if date is the nth dayname of month. Parameters are MONTH, DAYNAME, N. MONTH can be a list of months, the constant t, or an integer. The constant t means all months. If N is negative, count backward from the end of the month. (defalias 'diary-float #[(month dayname n) "@)AA@) <\n >%\n % =5\n $\"5 *" [date y m month t calendar-date-equal calendar-nth-named-day n dayname entry] 8 (#$ . 34336)]) #@490 Anniversary diary entry. Entry applies if date is the anniversary of MONTH, DAY, YEAR if `european-calendar-style' is nil, and DAY, MONTH, YEAR if `european-calendar-style' is t. Diary entry can contain `%d' or `%d%s'; the %d will be replaced by the number of years since the MONTH DAY, YEAR and the %s will be replaced by the ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. The anniversary of February 29 is considered to be March 1 in non-leap years. (defalias 'diary-anniversary #[(month day year) " \n\n  AA@)Z\fUS US˦UKͦU?KΦU)SVo\f E \"o!#," [european-calendar-style month day d m date y year diff 2 29 4 0 100 400 3 1 calendar-date-equal format entry diary-ordinal-suffix] 6 (#$ . 34808)]) #@372 Cycle diary entry--entry applies every N days starting at MONTH, DAY, YEAR. If `european-calendar-style' is t, parameters are N, DAY, MONTH, YEAR. ENTRY can contain `%d' or `%d%s'; the %d will be replaced by the number of years since the MONTH DAY, YEAR and the %s will be replaced by the ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. (defalias 'diary-cyclic #[(n month day year) " \n\n  AA@)S @) A@) AA@)\n S_\\ Vw _\\ͥZ ˦UnϦU?nЦU)w T  -_\\˥\\ϥ[\\Х\\*\f EAA@)S @) A@) AA@)\n S_\\ V _\\ͥZ ˦UϦU?ЦU) T  -_\\˥\\ϥ[\\Х\\*ZY4U4!#," [european-calendar-style month day d m date prior-years year 31 day-of-year 2 4 23 10 0 100 400 365 diff n cycle format entry diary-ordinal-suffix] 7 (#$ . 35622)]) #@77 Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.) (defalias 'diary-ordinal-suffix #[(n) ">ĦWŇĦH" [n 100 (11 12 13) 3 10 "th" ["th" "st" "nd" "rd"]] 3 (#$ . 36539)]) #@75 Day of year and number of days remaining in the year of date diary entry. (defalias 'diary-day-of-year #[nil " !" [calendar-day-of-year-string date] 2 (#$ . 36754)]) #@275 *Pseudo-pattern giving form of reminder messages in the fancy diary display. Used by the function `diary-remind', a pseudo-pattern is a list of expressions that can involve the keywords `days' (a number), `date' (a list of month, day, year), and `diary-entry' (a string). (defvar diary-remind-message (quote ("Reminder: Only " (if (= 0 (% days 7)) (concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks")) (concat (int-to-string days) (if (= 1 days) " day" " days"))) " until " diary-entry)) (#$ . -36929)) #@629 Provide a reminder of a diary entry. SEXP is a diary-sexp. DAYS is either a single number or a list of numbers indicating the number(s) of days before the event that the warning(s) should occur on. If the current date is (one of) DAYS before the event indicated by SEXP, then a suitable message (as specified by `diary-remind-message' is returned. In addition to the reminders beforehand, the diary entry also appears on the date itself. If optional parameter MARKING is non-nil then the reminders are marked on the calendar. Marking of reminders is independent of whether the entry itself is a marking or nonmarking one. (defalias 'diary-remind #[(sexp days &optional marking) "\n\n \fAA@)S@)A@) AA@)\n S_\\\fV\f_\\ХZ\f\n\nΦUz\nҦU?z\nӦU)\fT\f\f-_\\Υ\\ҥ[\\ӥ\\*\f\\!!#)\f<\f\f@ #\fA # \n!)" [nil diary-entry marking-diary-entries marking days calendar-gregorian-from-absolute date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 eval sexp mapconcat diary-remind-message "" diary-remind marking-diary-entry] 7 (#$ . 37456)]) #@91 Add the entry (DATE STRING) to `diary-entries-list'. Do nothing if DATE or STRING is nil. (defalias 'add-to-diary-list #[(date string) "   DC\"" [date string append diary-entries-list] 4 (#$ . 38656)]) #@134 Insert a diary entry STRING which may be NONMARKING in FILE. If omitted, NONMARKING defaults to nil and FILE defaults to diary-file. (defalias 'make-diary-entry #[(string &optional nonmarking file) "\n\n\n !!dbnĂ$%ɱ" [find-file-other-window substitute-in-file-name file diary-file "" "\n" nonmarking diary-nonmarking-symbol string " "] 4 (#$ . 38877)]) #@98 Insert a diary entry for the date indicated by point. Prefix arg will make the entry nonmarking. (defalias 'insert-diary-entry #[(arg) "!É#\f\"" [make-diary-entry calendar-date-string calendar-cursor-to-date t arg] 5 (#$ . 39266) "P"]) #@116 Insert a weekly diary entry for the day of the week indicated by point. Prefix arg will make the entry nonmarking. (defalias 'insert-weekly-diary-entry #[(arg) "!!\f\"" [make-diary-entry calendar-day-name calendar-cursor-to-date t arg] 4 (#$ . 39515) "P"]) #@118 Insert a monthly diary entry for the day of the month indicated by point. Prefix arg will make the entry nonmarking. (defalias 'insert-monthly-diary-entry #[(arg) " !\"\")" [european-calendar-style (day " * ") ("* " day) calendar-date-display-form make-diary-entry calendar-date-string calendar-cursor-to-date t arg] 4 (#$ . 39784) "P"]) #@117 Insert an annual diary entry for the day of the year indicated by point. Prefix arg will make the entry nonmarking. (defalias 'insert-yearly-diary-entry #[(arg) " !\"\")" [european-calendar-style (day " " monthname) (monthname " " day) calendar-date-display-form make-diary-entry calendar-date-string calendar-cursor-to-date t arg] 4 (#$ . 40146) "P"]) #@107 Insert an anniversary diary entry for the date given by point. Prefix arg will make the entry nonmarking. (defalias 'insert-anniversary-diary-entry #[(arg) " !##\f\")" [european-calendar-style (day " " month " " year) (month " " day " " year) calendar-date-display-form make-diary-entry format "%s(diary-anniversary %s)" sexp-diary-entry-symbol calendar-date-string calendar-cursor-to-date t nil arg] 8 (#$ . 40523) "P"]) #@119 Insert a block diary entry for the days between the point and marked date. Prefix arg will make the entry nonmarking. (defalias 'insert-block-diary-entry #[(arg) " !@!\n\f \nAA@)S@)A@)AA@)S_\\V_\\إZ֦UڦU?ۦU)T-_\\֥\\ڥ[\\ۥ\\*AA@)S@)A@)AA@)S_\\V_\\إZ֦UڦU?ۦU)T-_\\֥\\ڥ[\\ۥ\\*WG\n\f O\f\n  \f# #$\"\"-" [european-calendar-style (day " " month " " year) (month " " day " " year) calendar-date-display-form calendar-cursor-to-date t cursor calendar-mark-ring error "No mark set in this buffer" mark nil start end date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 make-diary-entry format "%s(diary-block %s %s)" sexp-diary-entry-symbol calendar-date-string arg] 10 (#$ . 40973) "P"]) #@109 Insert a cyclic diary entry starting at the date given by point. Prefix arg will make the entry nonmarking. (defalias 'insert-cyclic-diary-entry #[(arg) " \"!#$\")" [european-calendar-style (day " " month " " year) (month " " day " " year) calendar-date-display-form make-diary-entry format "%s(diary-cyclic %d %s)" sexp-diary-entry-symbol calendar-read "Repeat every how many days: " (lambda (x) (> x 0)) calendar-date-string calendar-cursor-to-date t nil arg] 9 (#$ . 41924) "P"]) (provide (quote diary-lib))