From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: happy@vole.com (mr.sparkle) Newsgroups: gmane.emacs.help Subject: Re: emacs diary/calendar insert day (i-d) Date: 13 Nov 2002 00:11:58 -0500 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <87d6pjsvv1.fsf@wesley.springies.com> <85n0oguot2.fsf@emr.cs.iit.edu> <85k7jkuikr.fsf@emr.cs.iit.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037165510 17749 80.91.224.249 (13 Nov 2002 05:31:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2002 05:31:50 +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 18Bq7s-0004bx-00 for ; Wed, 13 Nov 2002 06:31:44 +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 18Bq66-00088I-00; Wed, 13 Nov 2002 00:29:54 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!sn-xit-05!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 23 Original-Xref: shelby.stanford.edu gnu.emacs.help:106984 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:3538 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3538 On 11 Nov 2002, reingold@emr.cs.iit.edu wrote: >>>>>> "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 > EMR> fixed 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 " ")) This wouldn't evaluate for me