diff options
| author | Glenn Morris | 2008-03-27 08:26:17 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-27 08:26:17 +0000 |
| commit | 8b00ec890cd30ef3c8f1305bf7f21dc39b303c88 (patch) | |
| tree | 4ca54743bf3de4cd41904b712bdeeee2fd12840d | |
| parent | f97492e58e62c2cf0b62a05dcb32fc7bfb00fba9 (diff) | |
| download | emacs-8b00ec890cd30ef3c8f1305bf7f21dc39b303c88.tar.gz emacs-8b00ec890cd30ef3c8f1305bf7f21dc39b303c88.zip | |
(diary-mail-entries): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 36 |
2 files changed, 19 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20c6d317b06..cb8df662ed7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -13,8 +13,8 @@ | |||
| 13 | 13 | ||
| 14 | * calendar/diary-lib.el (diary-face-attrs): Fix `height' regexp. | 14 | * calendar/diary-lib.el (diary-face-attrs): Fix `height' regexp. |
| 15 | (list-diary-entries-hook, mark-diary-entries-hook) | 15 | (list-diary-entries-hook, mark-diary-entries-hook) |
| 16 | (include-other-diary-files, mark-included-diary-files) | 16 | (include-other-diary-files, diary-mail-entries) |
| 17 | (list-sexp-diary-entries): Doc fixes. | 17 | (mark-included-diary-files, list-sexp-diary-entries): Doc fixes. |
| 18 | (diary-set-header): New function. | 18 | (diary-set-header): New function. |
| 19 | (diary-header-line-flag, diary-header-line-format): | 19 | (diary-header-line-flag, diary-header-line-format): |
| 20 | Use diary-set-header for custom :set function. | 20 | Use diary-set-header for custom :set function. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 80ed704fcd8..4586e72d2c6 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1037,25 +1037,23 @@ is created." | |||
| 1037 | If no prefix argument is given, NDAYS is set to `diary-mail-days'. | 1037 | If no prefix argument is given, NDAYS is set to `diary-mail-days'. |
| 1038 | Mail is sent to the address specified by `diary-mail-addr'. | 1038 | Mail is sent to the address specified by `diary-mail-addr'. |
| 1039 | 1039 | ||
| 1040 | You can call `diary-mail-entries' every night using an at/cron job. | 1040 | Here is an example of a script to call `diary-mail-entries', |
| 1041 | For example, this script will run the program at 2am daily. Since | 1041 | suitable for regular scheduling using cron (or at). Note that |
| 1042 | `emacs -batch' does not load your `.emacs' file, you must ensure that | 1042 | since `emacs -script' does not load your `.emacs' file, you |
| 1043 | all relevant variables are set, as done here. | 1043 | should ensure that all relevant variables are set. |
| 1044 | 1044 | ||
| 1045 | #!/bin/sh | 1045 | #!/usr/bin/emacs -script |
| 1046 | # diary-rem.sh -- repeatedly run the Emacs diary-reminder | 1046 | ;; diary-rem.el - run the Emacs diary-reminder |
| 1047 | emacs -batch \\ | 1047 | |
| 1048 | -eval \"(setq diary-mail-days 3 \\ | 1048 | \(setq diary-mail-days 3 |
| 1049 | diary-file \\\"/path/to/diary.file\\\" \\ | 1049 | diary-file \"/path/to/diary.file\" |
| 1050 | european-calendar-style t \\ | 1050 | european-calendar-style t |
| 1051 | diary-mail-addr \\\"user@host.name\\\" )\" \\ | 1051 | diary-mail-addr \"user@host.name\") |
| 1052 | -l diary-lib -f diary-mail-entries | 1052 | |
| 1053 | at -f diary-rem.sh 0200 tomorrow | 1053 | \(diary-mail-entries) |
| 1054 | 1054 | ||
| 1055 | You may have to tweak the syntax of the `at' command to suit your | 1055 | # diary-rem.el ends here |
| 1056 | system. Alternatively, you can specify a cron entry: | 1056 | " |
| 1057 | 0 1 * * * diary-rem.sh | ||
| 1058 | to run it every morning at 1am." | ||
| 1059 | (interactive "P") | 1057 | (interactive "P") |
| 1060 | (if (string-equal diary-mail-addr "") | 1058 | (if (string-equal diary-mail-addr "") |
| 1061 | (error "You must set `diary-mail-addr' to use this command") | 1059 | (error "You must set `diary-mail-addr' to use this command") |