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

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

[emacs-wiki-discuss] Re: Task Ordering Question/Problem


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: Task Ordering Question/Problem
Date: Thu, 24 Mar 2005 21:35:32 +0800
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Jeremy Cowgar <address@hidden> writes:

> The changes I am making are automated: M-x
> planner-raise-task-priority, or C-c C-x on a task. I would think
> that those commands would handle the linked tasks, well, infact, it
> does. On the other page, they are adjusted correctly, just not
> reordered.

Oh! You want it to aggressively reorder every time you change tasks
instead of just when you save? That can be done, although I turned it
off when I was experimenting with it because stuff kept jumping
around.

(defadvice planner-raise-task-priority

How to change this:

;; Use a macro for the setup around planner-update-task so
;; the same setup can be used in planner-multi.el
(defmacro with-planner-update-setup (&rest body)
  "Execute BODY then save buffers according to `planner-tasks-file-behavior'.
Also sets some variables to modify font-lock behaviour while updating."
  (let ((live-buffers (make-symbol "live-buffers")))
    `(save-window-excursion
       (save-restriction
         (let ((,live-buffers (and (eq planner-tasks-file-behavior
                                       'close)
                                   (buffer-list))))
           ,@body
           (when planner-tasks-file-behavior
             (planner-save-buffers ,live-buffers nil)))))))
             ;; JEREMY: nil last argument instead of t so that it fixes things
   
and then set planner-tasks-file-behavior to something like 'save.

Hope that helps!

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




reply via email to

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