From: Charles Curley <charlescurley@charlescurley.com>
To: help-gnu-emacs@gnu.org
Subject: Daily Diary Display in Emacs emacs24 24.4+1-5
Date: Fri, 23 Oct 2015 10:24:09 -0600 [thread overview]
Message-ID: <20151023102409.76785eec@jhegaala.localdomain> (raw)
I have emacs24, 24.4+1-5 on Debian 8.2 jessie. In the past (e.g. emacs
23.4+1-4 on debian 7.x, wheezy), I have had emacs re-display my diary
every day automatically. This capability does not seem to work on this
version of emacs.
Relevant portions of my .emacs (watch for wrapping):
--------------------------------------------------
;; Calendar stuff:
(if (system-is-desktop)
(progn
;; ---great bit of code from Jeff Miller to highlight appointments in red on modeline---
;; per http://www.emacswiki.org/emacs/AppointmentMode
(defface appt-face
'((t (:foreground "red" :background "white")))
"Face to indicate a current appointment."
:group 'appt)
(defadvice appt-disp-window (before appt-hilite-more activate)
(when appt-mode-string
(put-text-property 1 (- (length appt-mode-string) 1)
'face 'appt-face appt-mode-string)))
(defadvice appt-check (after appt-hilite activate)
(when appt-mode-string
(put-text-property 1 (- (length appt-mode-string) 1)
'face 'appt-face appt-mode-string)
(force-mode-line-update)))
;; ---------------------------------
;; (seq appt-display-mode-line t) ; explicitly enable it.
;; set my home co-ordinates for sunrise/sunset calculations
(setq calendar-latitude xx.x)
(setq calendar-longitude xxx.x)
(setq calendar-location-name "obfuscated")
(calendar) ; fire up the calendar display.
(setq show-trailing-whitespace nil)
;; (setq cal-tex-diary t)
;; (setq cal-tex-rules t)
(progn
(calendar-mark-holidays)
(diary-mark-entries)
(other-window 1) ; Now switch to the main window on this frame.
;; Set a vector for the number of days in advance to show
;; appointments. Then turn the diary mode on.
(setq diary-number-of-entries [2 3 3 3 3 5 2])
;; Add the appointment generator to the diary hook.
(if ( < emacs-major-version 24) ; emacs 23 or less
(add-hook 'diary-hook 'appt-make-list)
)
;; (add-hook 'diary-display-function 'diary-fancy-display)
(setq diary-display-function 'diary-fancy-display)
)
;; If this is non-nil, Emacs rings the terminal bell for appointment
;; reminders. The default is t.
;; (setq appt-audible nil)
(setq appt-activate 1 ; http://www.emacswiki.org/emacs/AppointmentMode
appt-display-duration 59)
;; Also from http://www.emacswiki.org/emacs/AppointmentMode
(defun diary-save-hook ()
"Stuff to do when saving the diary files."
(appt-initialize))
(defun add-diary-save-hook ()
"find-file-hooks hook to add the diary-save-hook when appropriate"
(if (string-match "diary" (buffer-name))
(add-hook 'after-save-hook 'diary-save-hook)))
(add-hook 'find-file-hooks 'add-diary-save-hook)
(diary)
)
)
;; end calendar/diary stuff
--------------------------------------------------
--
The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no Warrants shall issue, but upon probable cause,
supported by Oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.
-- U.S. Const. Amendment IV
Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB
next reply other threads:[~2015-10-23 16:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 16:24 Charles Curley [this message]
2015-10-23 20:44 ` Daily Diary Display in Emacs emacs24 24.4+1-5 Emanuel Berg
2015-10-23 22:11 ` Charles Curley
2015-10-24 0:20 ` Emanuel Berg
2015-10-24 0:28 ` John Mastro
2015-10-24 15:44 ` Stephen Berman
2015-10-24 17:48 ` Charles Curley
2015-10-26 22:44 ` Charles Curley
2015-10-27 0:11 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151023102409.76785eec@jhegaala.localdomain \
--to=charlescurley@charlescurley.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).