From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kester Clegg Newsgroups: gmane.emacs.help Subject: Re: diary display won't initialise correctly? Date: 07 Feb 2003 11:35:16 +0000 Organization: Rolls Royce UTC, Dept. of Computer Science, University of York, UK Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3E42E752.6030009@ihs.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044618641 8250 80.91.224.249 (7 Feb 2003 11:50:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 11:50:41 +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 18h71f-00028h-00 for ; Fri, 07 Feb 2003 12:50:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18h6sN-00010R-00 for gnu-help-gnu-emacs@m.gmane.org; Fri, 07 Feb 2003 06:40:59 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!xara.net!gxn.net!server6.netnews.ja.net!news.york.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: pc310.cs.york.ac.uk Original-X-Trace: pump1.york.ac.uk 1044617714 2647 144.32.40.101 (7 Feb 2003 11:35:14 GMT) Original-X-Complaints-To: abuse@york.ac.uk Original-NNTP-Posting-Date: 7 Feb 2003 11:35:14 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:109906 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6411 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6411 Kevin Rodgers 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 ************************************************************************