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

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

[emacs-wiki-discuss] Re: planner use with diary notes


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: planner use with diary notes
Date: Wed, 24 Aug 2005 17:15:09 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

<address@hidden> writes:

Hello, Mirko!

By the way, have you heard about the mailing list? It's at
address@hidden
(http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss). =) If
you prefer to use Gmane (a mailing list->NNTP/blog gateway), check out
http://blog.gmane.org/gmane.emacs.wiki.general . =)

> I am using planner.el for, well, planning. What I'd like to do also,
> is to be able to write some kind of diary, log, or blog as I go

Oooh! I like using Remember Mode, which is part of the
sacha-dev.tar.gz and sacha-stable.tar.gz packages.
Check remember-planner.el for installation instructions.
It's great for jotting short notes with automatic hyperlinks.

> Now, I know that I can do planner-create-note-from-task. However, if
> I already have a note for that task (which has been carried over
> from the previous day, or from a project file), I will get two note
> symbols (ellipsis) for that task. So, either the
> planner-create-note-from-task has to be re-configured, or planner
> has to link to diary to create a note there.

Hmm... Here's some code that tries its best to reuse notes and put
them on plan pages. Does it work for you? =)

(defun mirko/planner-create-note-from-task (&optional plan-page-p)
  "Create a note on the task's plan page or on 'TaskPool' if there is none.
Reuse notes."
  (interactive)
  (let ((task-info (planner-current-task-info))
        note-num)
    (when task-info
      ;; Check if the task already has an associated note
      (if (string-match (concat "\\(" emacs-wiki-name-regexp "\\)#[0-9]+")
                        (planner-task-description task-info))
          (progn
            (planner-visit-link (match-string 0 (planner-task-description 
task-info)))
            (forward-line 1))
        (planner-visit-link (or (planner-task-plan task-info)
                                "TaskPool"))
        (setq note-num (planner-create-note (planner-page-name)))
        (save-excursion
          (save-window-excursion
            (when (planner-find-task task-info)
              (planner-edit-task-description
               (concat (planner-task-description task-info) " "
                       (planner-make-link
                        (concat (planner-page-name) "#"
                                (number-to-string note-num))
                        (format "(%d)" note-num)))))))
        (insert " " (planner-task-description task-info) "\n\n")))))

                            
-- 
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, juggling
sachac on irc.freenode.net#emacs . YM: sachachua83




reply via email to

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