[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: update date in diary
Re: update date in diary
Sat, 14 Sep 2002 16:18:12 GMT
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020606
I liked this thread on calendars so much, that I am
making it the welcome screen on future versions of my
EMacro project <url: http://emacro.sf.net/ >
Here is the code I have combined, so far:
(more discussion, below)
(defgroup e-common nil "Settings from e-common.el file." :group 'emacs)
(defcustom mark-diary-entries-in-calendar t
"This takes effect when you invoke 'M-x calendar'."
(defcustom mark-holidays-in-calendar t "Display holidays."
(defcustom calendar-startup t "Display diary when starting Emacs."
(defconst diary-display-hook 'fancy-diary-display)
(setq today-visible-calendar-hook 'calendar-mark-today)
;;(setq calendar-setup 'one-frame) ;ToDo: errors on Emacs v21.2.1
(autoload 'calendar "calendar" "Display 3-month calendar." t)
;;Is this actually useful?
;;(setq calendar-latitude 40.7) ;New York City
;;(setq calendar-longitude -73.9) ;New York City, EDT
;;Doesn't seem to do anything
;;(add-hook 'diary-hook 'appt-make-list)
(let ((inhibit-redisplay t))
(if (file-exists-p diary-file)
I am still wrestling with the defcustom() statements; you may wish to
replace them with setq()s.
I want to provide users with easy M-x customizability. While I should
put most of the defcustom() statements as custom-set-value()s at the end
of my .emacs (system), I need their values for this to execute. It seems
that shadowing a copy of them is the best compromise.
I also liked it, when the calendar (when run in X or other Window)
popped up in a separate frame. I'm happy for someone to save me time,
puzzling how to get that back.
Ideally, I'd like the calendar & holidays to appear in one frame. If
diary-file exists, I'd like diary, too. I tried
(setq calendar-setup 'one-frame)
but this caused errors in Emacs v21.2.1, running on Linux. The default
of nil works fine, except when I add holidays to the mix.
Finally, since this is the opening screen, I'd like a message to new
users, explaining that they can use C-x 1 to unsplit the buffers.
This could appear in the scratch buffer.
This would only be necessary for console mode, if I get Calendar to pop
up in a new frame in window mode.
Finally, I'd also like appt-check to pop up any outstanding
appointments. I could not get that to work.
Thanks ahead to everyone for your help!