aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2008-03-27 08:26:17 +0000
committerGlenn Morris <[email protected]>2008-03-27 08:26:17 +0000
commit8b00ec890cd30ef3c8f1305bf7f21dc39b303c88 (patch)
tree4ca54743bf3de4cd41904b712bdeeee2fd12840d
parentf97492e58e62c2cf0b62a05dcb32fc7bfb00fba9 (diff)
(diary-mail-entries): Doc fix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/calendar/diary-lib.el36
2 files changed, 19 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 20c6d317b0..cb8df662ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -13,8 +13,8 @@
* calendar/diary-lib.el (diary-face-attrs): Fix `height' regexp.
(list-diary-entries-hook, mark-diary-entries-hook)
- (include-other-diary-files, mark-included-diary-files)
- (list-sexp-diary-entries): Doc fixes.
+ (include-other-diary-files, diary-mail-entries)
+ (mark-included-diary-files, list-sexp-diary-entries): Doc fixes.
(diary-set-header): New function.
(diary-header-line-flag, diary-header-line-format):
Use diary-set-header for custom :set function.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 80ed704fcd..4586e72d2c 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1037,25 +1037,23 @@ is created."
If no prefix argument is given, NDAYS is set to `diary-mail-days'.
Mail is sent to the address specified by `diary-mail-addr'.
-You can call `diary-mail-entries' every night using an at/cron job.
-For example, this script will run the program at 2am daily. Since
-`emacs -batch' does not load your `.emacs' file, you must ensure that
-all relevant variables are set, as done here.
-
-#!/bin/sh
-# diary-rem.sh -- repeatedly run the Emacs diary-reminder
-emacs -batch \\
--eval \"(setq diary-mail-days 3 \\
- diary-file \\\"/path/to/diary.file\\\" \\
- european-calendar-style t \\
- diary-mail-addr \\\"[email protected]\\\" )\" \\
--l diary-lib -f diary-mail-entries
-at -f diary-rem.sh 0200 tomorrow
-
-You may have to tweak the syntax of the `at' command to suit your
-system. Alternatively, you can specify a cron entry:
-0 1 * * * diary-rem.sh
-to run it every morning at 1am."
+Here is an example of a script to call `diary-mail-entries',
+suitable for regular scheduling using cron (or at). Note that
+since `emacs -script' does not load your `.emacs' file, you
+should ensure that all relevant variables are set.
+
+#!/usr/bin/emacs -script
+;; diary-rem.el - run the Emacs diary-reminder
+
+\(setq diary-mail-days 3
+ diary-file \"/path/to/diary.file\"
+ european-calendar-style t
+ diary-mail-addr \"[email protected]\")
+
+\(diary-mail-entries)
+
+# diary-rem.el ends here
+"
(interactive "P")
(if (string-equal diary-mail-addr "")
(error "You must set `diary-mail-addr' to use this command")