From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: bruce ingalls Newsgroups: gmane.emacs.help Subject: Re: update date in diary Date: Sat, 14 Sep 2002 16:18:12 GMT Organization: Road Runner - NYC Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3D82F1B2.8020505@fit-zones.NO-SPAM.com> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1032021364 13303 127.0.0.1 (14 Sep 2002 16:36:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 14 Sep 2002 16:36:04 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17qFtq-0003SI-00 for ; Sat, 14 Sep 2002 18:36:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qFu1-0006ql-00; Sat, 14 Sep 2002 12:36:13 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.rdc-nyc.rr.com!news-out.nyc.rr.com!twister.nyc.rr.com.POSTED!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020606 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 82 Original-NNTP-Posting-Host: 24.168.133.242 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: twister.nyc.rr.com 1032020292 24.168.133.242 (Sat, 14 Sep 2002 12:18:12 EDT) Original-NNTP-Posting-Date: Sat, 14 Sep 2002 12:18:12 EDT Original-Xref: nntp.stanford.edu gnu.emacs.help:104914 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1469 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1469 I liked this thread on calendars so much, that I am making it the welcome screen on future versions of my EMacro project 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