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

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

Re: [emacs-wiki-discuss] Re: Planner on multiple computers


From: Toby Allsopp
Subject: Re: [emacs-wiki-discuss] Re: Planner on multiple computers
Date: Thu, 31 Mar 2005 07:11:30 +1200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (cygwin)

On 31 Mar 2005 at 01:52 NZST, Paul Lussier (address@hidden) wrote:

> Sacha Chua <address@hidden> writes:
>
>> - You can use M-x planner-create-note-from-task to create a note
>> associated with a particular task.
>
> Hmmm, I have remember bound to F7 which I use extensively for
> creating notes.  How hard would it be to modify the remember
> function to discern when point is currently on a task, and then
> create note linked to that task instead of the normal remember
> function of just creating a non-task related note?

I wanted the exact same thing.  Here's what I have in my .emacs:

--8<---------------cut here---------------start------------->8---
;; Create notes from tasks
(defun my-planner-create-note-possibly-from-task ()
  "Create a note.  If point is on a task then craete a note from that task."
  (interactive)
  (if (planner-current-task-info)
      (call-interactively 'planner-create-note-from-task)
    (call-interactively 'planner-create-note)))
(define-key planner-mode-map [(control c) (control n)]
  'my-planner-create-note-possibly-from-task)
--8<---------------cut here---------------end--------------->8---

You can probably do the same thing without rebinding the key to a
different function using advice, but I like this way as I can easily
call the original `planner-create-note' if I don't want to add a note
to the current task (but do want to create a note, obviously).

Toby.




reply via email to

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