From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Shutko Newsgroups: gmane.emacs.help Subject: Re: emacs diary/calendar insert day (i-d) Date: Tue, 05 Nov 2002 18:52:58 GMT Organization: Optimum Online Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87d6pjsvv1.fsf@wesley.springies.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1036524445 6022 80.91.224.249 (5 Nov 2002 19:27:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2002 19:27:25 +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 1899MB-0001Z0-00 for ; Tue, 05 Nov 2002 20:27:24 +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 18995A-0002AE-00; Tue, 05 Nov 2002 14:09:48 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeeds-atl2!newsfeeds-atl1.usenetserver.com!news.webusenet.com!news01.optonline.net!news4.srv.hcvlny.cv.net.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Original-Lines: 29 Cancel-Lock: sha1:Zhqf5yYzL1iLKn9iCG4OOjIuhuI= Original-NNTP-Posting-Host: 24.47.114.19 Original-X-Trace: news4.srv.hcvlny.cv.net 1036522378 24.47.114.19 (Tue, 05 Nov 2002 13:52:58 EST) Original-NNTP-Posting-Date: Tue, 05 Nov 2002 13:52:58 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:106770 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:3326 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3326 Matthias Meulien writes: > Note that it sometime places an empty line at the top of the file, so > it is impossible to specify local variables in the diary file... Until that gets fixed (on my list), you can use this: (defvar ats-diary-file-list `(,(expand-file-name diary-file) ,(expand-file-name "~/Library/diary-historical") ,(expand-file-name "~/Library/diary-anniversaries")) "List of diary files.") (defun ats-fix-diary-top () "Remove newlines at the top of the diary file when saving." (save-excursion (if (member buffer-file-name ats-diary-file-list) (progn (goto-char (point-min)) (if (re-search-forward "\\`\n+" nil t) (replace-match "")))) nil)) (add-hook 'write-file-hooks 'ats-fix-diary-top) -- Alan Shutko - In a variety of flavors! Moron President Found. (A)bort (R)etry (S)hoot