From: Alan Shutko <ats@acm.org>
Subject: Re: emacs diary/calendar insert day (i-d)
Date: Tue, 05 Nov 2002 18:52:58 GMT [thread overview]
Message-ID: <87d6pjsvv1.fsf@wesley.springies.com> (raw)
In-Reply-To: m2u1iv279c.fsf@clarinde.localdomain
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
next prev parent reply other threads:[~2002-11-05 18:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 0:57 emacs diary/calendar insert day (i-d) mr.sparkle
2002-11-05 18:36 ` Matthias Meulien
2002-11-05 18:52 ` Alan Shutko [this message]
2002-11-09 19:46 ` Janusz S. Bień
[not found] ` <mailman.1036861638.12745.help-gnu-emacs@gnu.org>
2002-11-10 1:53 ` Alan Shutko
2002-11-10 10:26 ` Matthias Meulien
2002-11-11 10:11 ` Janusz S. Bień
[not found] ` <mailman.1036999692.28763.help-gnu-emacs@gnu.org>
2002-11-11 15:08 ` Edward M. Reingold
2002-11-11 17:23 ` Edward M. Reingold
2002-11-13 5:11 ` mr.sparkle
2002-11-07 18:25 ` Edward M. Reingold
2002-11-07 23:38 ` mr.sparkle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d6pjsvv1.fsf@wesley.springies.com \
--to=ats@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.