From: bruce ingalls <bingalls@fit-zones.NO-SPAM.com>
Subject: Re: update date in diary
Date: Sat, 14 Sep 2002 16:18:12 GMT [thread overview]
Message-ID: <3D82F1B2.8020505@fit-zones.NO-SPAM.com> (raw)
In-Reply-To: mailman.1031939415.20318.help-gnu-emacs@gnu.org
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)
;;__________________________________________________________________________
;;;;;;
Calendar
(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'."
:group 'e-common
:type 'boolean)
(defcustom mark-holidays-in-calendar t "Display holidays."
:group 'e-common
:type 'boolean)
(defcustom calendar-startup t "Display diary when starting Emacs."
:group 'e-common
:type 'boolean)
(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
(require 'appt)
(appt-check)
;;(add-hook 'diary-hook 'appt-make-list)
(when calendar-startup
(let ((inhibit-redisplay t))
;; (save-window-excursion
(calendar)
(if (file-exists-p diary-file)
(progn
(mark-diary-entries)
(diary)))
;;
(holidays)
))
;;__________________________________________________________________________
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!
-Bruce
next parent reply other threads:[~2002-09-14 16:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1031939415.20318.help-gnu-emacs@gnu.org>
2002-09-14 16:18 ` bruce ingalls [this message]
2002-09-15 2:54 ` update date in diary Edward M. Reingold
2002-09-15 14:29 ` bruce ingalls
2002-09-16 13:38 ` Stefan Monnier <foo@acm.com>
2002-09-16 20:36 ` bruce ingalls
[not found] <mailman.1031871312.16859.help-gnu-emacs@gnu.org>
2002-09-13 1:23 ` Edward M. Reingold
2002-09-13 14:51 ` Kai Großjohann
2002-09-16 1:02 ` Kenneth Jacker
2002-09-13 14:52 ` Stefan Monnier <foo@acm.com>
2002-09-13 17:49 ` Randy Zelick
2002-09-12 22:53 Randy Zelick
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D82F1B2.8020505@fit-zones.NO-SPAM.com \
--to=bingalls@fit-zones.no-spam.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.