[Top][All Lists]

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

Enhancement request for diary-lib.el with fancy diary display

From: Jens Schmidt
Subject: Enhancement request for diary-lib.el with fancy diary display
Date: 26 Mar 2001 10:03:12 +0100

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i386-*-nt4.0.1381)
 of Tue Jun 13 2000 on buffy
configured using `configure NT'


I use the following advices to tweak the fancy diary display
behaviour.  Maybe it would make sense to incorporate them somehow
or other into the standard diary-lib.el:

(defadvice add-to-diary-list (before emacs-fix activate)
  "Strip off leading whitespace from STRING.
Otherwise, a well-indented diary-file looks awful in fancy diary
  (when (stringp (ad-get-arg 1))
    (let* ((s (ad-get-arg 1))
           (n (length s))
           (i 0))
      (while (and (< i n) (= (char-syntax (aref s i)) ?\ ))
        (setq i (1+ i)))
      (ad-set-arg 1 (substring s i)))))

(defadvice make-fancy-diary-buffer (around emacs-fix activate)
  "Enhancement redefinition.
Provides a little more eloquent mode line for the fancy diary buffer."
    (set-buffer (get-buffer-create fancy-diary-buffer))
    (setq buffer-read-only nil)
    (make-local-variable 'mode-line-format)
     (concat "Diary Entries for " date-string))
    (set-buffer-modified-p nil)
    (setq buffer-read-only t)
    (setq ad-return-value (get-buffer fancy-diary-buffer))))



reply via email to

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