all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: diary display won't initialise correctly?
Date: Thu, 06 Feb 2003 15:53:06 -0700	[thread overview]
Message-ID: <3E42E752.6030009@ihs.com> (raw)
In-Reply-To: yqr4r7h1ekj.fsf@cs.york.ac.uk

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	other threads:[~2003-02-06 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-06 17:53 diary display won't initialise correctly? Kester Clegg
2003-02-06 22:53 ` Kevin Rodgers [this message]
2003-02-07 11:35   ` Kester Clegg
2003-02-11  0:29     ` Kevin Rodgers

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=3E42E752.6030009@ihs.com \
    --to=kevin.rodgers@ihs.com \
    /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.