diff options
| author | Edward M. Reingold | 1994-11-01 02:18:56 +0000 |
|---|---|---|
| committer | Edward M. Reingold | 1994-11-01 02:18:56 +0000 |
| commit | 43310354c56bedfce456cd1f959de2e8230fd588 (patch) | |
| tree | 263d3ff1c31774cdf35282f70d96cc33a6e93d41 | |
| parent | 954366308345c5b1d7c13dacc0e01e138d48a1f8 (diff) | |
| download | emacs-43310354c56bedfce456cd1f959de2e8230fd588.tar.gz emacs-43310354c56bedfce456cd1f959de2e8230fd588.zip | |
New function to display an alternative diary file.
| -rw-r--r-- | lisp/diary-lib.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/diary-lib.el b/lisp/diary-lib.el index 7dca68c8a74..ccf80d44de6 100644 --- a/lisp/diary-lib.el +++ b/lisp/diary-lib.el | |||
| @@ -67,16 +67,28 @@ in the displayed three-month calendar." | |||
| 67 | (if (and d-file (file-exists-p d-file)) | 67 | (if (and d-file (file-exists-p d-file)) |
| 68 | (if (file-readable-p d-file) | 68 | (if (file-readable-p d-file) |
| 69 | (list-diary-entries (calendar-cursor-to-date t) arg) | 69 | (list-diary-entries (calendar-cursor-to-date t) arg) |
| 70 | (error "Your diary file is not readable!")) | 70 | (error "Diary file is not readable!")) |
| 71 | (error "You don't have a diary file!")))) | 71 | (error "You don't have a diary file!")))) |
| 72 | 72 | ||
| 73 | (defun view-other-diary-entries (arg diary-file) | ||
| 74 | "Prepare and display buffer of diary entries from an alternative diary file. | ||
| 75 | Prompts for a file name and searches that file for entries that match ARG | ||
| 76 | days starting with the date indicated by the cursor position in the displayed | ||
| 77 | three-month calendar." | ||
| 78 | (interactive | ||
| 79 | (list (cond ((null current-prefix-arg) 1) | ||
| 80 | ((listp current-prefix-arg) (car current-prefix-arg)) | ||
| 81 | (t current-prefix-arg)) | ||
| 82 | (setq diary-file (read-file-name "Enter diary file name: " | ||
| 83 | default-directory nil t)))) | ||
| 84 | (view-diary-entries arg)) | ||
| 85 | |||
| 73 | (autoload 'check-calendar-holidays "holidays" | 86 | (autoload 'check-calendar-holidays "holidays" |
| 74 | "Check the list of holidays for any that occur on DATE. | 87 | "Check the list of holidays for any that occur on DATE. |
| 75 | The value returned is a list of strings of relevant holiday descriptions. | 88 | The value returned is a list of strings of relevant holiday descriptions. |
| 76 | The holidays are those in the list `calendar-holidays'." | 89 | The holidays are those in the list `calendar-holidays'." |
| 77 | t) | 90 | t) |
| 78 | 91 | ||
| 79 | |||
| 80 | (autoload 'calendar-holiday-list "holidays" | 92 | (autoload 'calendar-holiday-list "holidays" |
| 81 | "Form the list of holidays that occur on dates in the calendar window. | 93 | "Form the list of holidays that occur on dates in the calendar window. |
| 82 | The holidays are those in the list `calendar-holidays'." | 94 | The holidays are those in the list `calendar-holidays'." |