emacs-wiki-discuss
[Top][All Lists]
Advanced

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

[emacs-wiki-discuss] Re: planner-diary.el


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: planner-diary.el
Date: Thu, 25 Mar 2004 19:17:11 +0800
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden (Thomas Gehrlein) writes:

>> I think your original way of doing it would be great in
>> planner-diary.el .
> What is your original way of doing it?  I don't use remember and I'm not sure
> what your're talking about.

Jody suggested a way to add stuff to diary.

I've rewritten the function. This might work better. Jody, could you
try it out? =)

(defun planner-diary-add-entry (date text)
  "Prompt for a diary entry to add to `diary-file'."
  (interactive (list (planner-read-date)
                     (read-string "Diary entry: ")))
  (save-excursion
    (save-window-excursion
      (make-diary-entry
       (concat
        (let ((cal-date (planner-filename-to-calendar-date date)))
          (if european-calendar-style
              (format "%d/%d/%d"
                      (elt cal-date 1)
                      (elt cal-date 0)
                      (elt cal-date 2))
            (format "%d/%d/%d"
                    (elt cal-date 0)
                    (elt cal-date 1)
                    (elt cal-date 2))))
        " " text " "
        (run-hook-with-args-until-success
         'planner-annotation-functions))))))

I've patched it into planner-diary.el in the planner-dev branch and
have tested it a bit.
-- 
Sacha Chua <address@hidden> - Ateneo CS faculty geekette
interests: emacs, gnu/linux, making computer science education fun
http://sacha.free.net.ph/ - PGP Key ID: BE2D08EC




reply via email to

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