[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs diary/calendar insert day (i-d)
From: |
Alan Shutko |
Subject: |
Re: emacs diary/calendar insert day (i-d) |
Date: |
Tue, 05 Nov 2002 18:52:58 GMT |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Matthias Meulien <meulien@club.lemonde.fr> 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 <ats@acm.org> - In a variety of flavors!
Moron President Found. (A)bort (R)etry (S)hoot
- emacs diary/calendar insert day (i-d), mr.sparkle, 2002/11/04
- Re: emacs diary/calendar insert day (i-d), Matthias Meulien, 2002/11/05
- Re: emacs diary/calendar insert day (i-d),
Alan Shutko <=
- Message not available
- Re: emacs diary/calendar insert day (i-d), Matthias Meulien, 2002/11/10
- Re: emacs diary/calendar insert day (i-d), Janusz S. Bień, 2002/11/11
- Message not available
- Re: emacs diary/calendar insert day (i-d), Edward M. Reingold, 2002/11/11
- Re: emacs diary/calendar insert day (i-d), Edward M. Reingold, 2002/11/11
- Re: emacs diary/calendar insert day (i-d), mr.sparkle, 2002/11/13
Re: emacs diary/calendar insert day (i-d), Edward M. Reingold, 2002/11/07