help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diary display won't initialise correctly?


From: Kevin Rodgers
Subject: Re: diary display won't initialise correctly?
Date: Thu, 06 Feb 2003 15:53:06 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Kester Clegg wrote:

Having put the following hooks into my .emacs, I notice on pressing 'd',
just a single day is displayed, moving my cursor means 4 days are
displayed which is what I want. How can I get it to display 4 days to
begin with, or each time I press 'd'?  I've included seemingly
irrelevant lines just case someone knows of any conflicts.


;;------------------
(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?


(setq-default save-place t)
(setq european-calendar-style 't)

(display-time)

(setq calendar-latitude 54.5)
(setq calendar-longitude 1)
(setq calendar-location-name "BelleVue Street, York")

Here's a hack to use `number-of-diary-entries' as the default instead of 1.  I'm

sure you can figure out how to change that to 4.  :-)


(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)))

--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]