From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: reingold@emr.cs.iit.edu (Edward M. Reingold) Newsgroups: gmane.emacs.help Subject: Re: emacs diary/calendar insert day (i-d) Date: 11 Nov 2002 11:23:00 -0600 Organization: Illinois Institute of Technology Sender: help-gnu-emacs-admin@gnu.org Message-ID: <85k7jkuikr.fsf@emr.cs.iit.edu> References: <87d6pjsvv1.fsf@wesley.springies.com> <85n0oguot2.fsf@emr.cs.iit.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1037035784 18029 80.91.224.249 (11 Nov 2002 17:29:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 11 Nov 2002 17:29:44 +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 18BINZ-0004gV-00 for ; Mon, 11 Nov 2002 18:29:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BIMG-0005cx-00; Mon, 11 Nov 2002 12:28:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news-out.spamkiller.net!propagator-la!news-in.superfeed.net!news-in-la.newsfeeds.com!newsfeed.onecall.net!chcgil2-snf1.gtei.net!news.gtei.net!news.illinois.net!news.iit.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: emr.cs.iit.edu Original-X-Trace: condor2.cns.iit.edu 1037035382 13021 216.47.142.126 (11 Nov 2002 17:23:02 GMT) Original-X-Complaints-To: usenet@news.iit.edu Original-NNTP-Posting-Date: Mon, 11 Nov 2002 17:23:02 +0000 (UTC) X-Newsreader: Gnus v5.7/Emacs 20.7 Original-Xref: shelby.stanford.edu gnu.emacs.help:106936 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:3488 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3488 >>>>> "EMR" == Edward M Reingold writes: JS=> I hope the future versions of diary functions will take care of local JS=> variables blocks. EMR> Yes, that really is a bug. I will try to see that it gets fixed EMR> soon. -- Can somebody test this in Emacs 21 (which I don't use yet): (defun make-diary-entry (string &optional nonmarking file) "Insert a diary entry STRING which may be NONMARKING in FILE. If omitted, NONMARKING defaults to nil and FILE defaults to diary-file." (find-file-other-window (substitute-in-file-name (if file file diary-file))) (widen) (goto-char (point-max)) (if (let ((case-fold-search t)) (search-backward "Local Variables:" (max (- (point-max) 3000) (point-min)) t)) (progn (beginning-of-line) (insert "\n") (previous-line 1))) (insert (if (bolp) "" "\n") (if nonmarking diary-nonmarking-symbol "") string " ")) -- Professor Edward M. Reingold Email: reingold@iit.edu Chairman, Department of Computer Science Voice: (312) 567-3309 Illinois Institute of Technology Assistant: (312) 567-5152 Stuart Building Fax: (312) 567-5067 10 West 31st Street, Suite 236 Chicago, IL 60616-3729 U.S.A.