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

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

Re: [emacs-wiki-discuss] Re: Planenr snippet: count tasks in page


From: Patricia J. Hawkins
Subject: Re: [emacs-wiki-discuss] Re: Planenr snippet: count tasks in page
Date: Tue, 26 Jul 2005 11:16:42 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

>>>>> "AK" == Alex Kavanagh <address@hidden> writes:
>> 
>> Do you notice this underline problem happening when you're viewing a
>> file, publishing, or both?

AK> I tried it out and it is only a display problem.  It doesn't happen
AK> when the file is published.

Are you on the latest sacha-dev?  I saw the same underlining problem
(w/ emacs-wiki), using Chris's nifty bit of embedded lisp, but it
went away when I upgraded.

I also wrote the below function to make the string construction &
modification less hairy -- still hairy enough though!

Code critiques welcome, as I'm a dilettante as far as elisp is
concerned -- I used concat rather than format because I like to be
able to read through the construction of the string sequentially.

(defun pjh/planner-task-counter (planner-plan-page
                                            &optional function-name )
  "Construct a string for use with chrismdp/planner-count-tasks"
  (setq counting-string  (concat "<lisp>("
                                (cond (function-name  function-name)
                                      (t "chrismdp/planner-count-tasks"))" \""))
  (concat "[[" planner-plan-page "][" planner-plan-page"]]\t"
          counting-string  planner-plan-page "\" \"_\" \"A\")</lisp> high 
priority\t"
          counting-string planner-plan-page "\"\"_\")</lisp> open tasks"))

Call it like so when constructing your day-page-template:

(custom-set-variables
        ; lots of other variables 
 '(planner-day-page-template (concat "\n"
        (pjh/planner-task-counter "EmailReplies") "\n"
        (pjh/planner-task-counter "PlanAndOrg") "\n"
; etc
; rest of template))
)

-- 
Patricia J. Hawkins
Hawkins Internet Applications
www.hawkinsia.com





reply via email to

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