[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diary display won't initialise correctly?
From: |
Kester Clegg |
Subject: |
Re: diary display won't initialise correctly? |
Date: |
07 Feb 2003 11:35:16 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Kevin Rodgers <kevin.rodgers@ihs.com> writes:
[...]
> > (add-hook 'calendar-move-hook (lambda () (view-diary-entries 4)))
> > (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
> > (add-hook 'diary-hook 'appt-make-list)
> > (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
> > (add-hook 'diary-display-hook 'fancy-diary-display)
> > (setq number-of-diary-entries 7)
>
>
> Why 7 instead of 4?
I was playing around, of course! :-)
[...]
> (defadvice view-diary-entries (before number-of-diary-entries activate)
> "If ARG is not specified, display `number-of-diary-entries' instead of 1."
> (if (and (interactive-p)
> (null current-prefix-arg))
> (ad-set-arg 0 number-of-diary-entries)))
Thanks for that, seems to work fine - so is defadvice the standard way
to get a hook into something before it runs? What made you take that
route?
--
************************************************************************
Kester Clegg Dept. of Computer Science,
Research Assistant (UTC) University of York,
Tel (01904) 43 27 49 email: kester at cs.york.ac.uk
************************************************************************