emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Can I get match count?


From: Osamu OKANO
Subject: Re: [O] Can I get match count?
Date: Wed, 27 Apr 2011 23:40:17 +0900

Hi!
Thank you for your advice.
I made a growl script and set to crontab.
It works correctly.

#+BEGIN_SRC sh
m=`emacsclient -e '(org-agenda-match-count
"TODO=\"TODO\"STYLE=\"habit\"+SCHEDULED<=\"<now>\"")'`
if [ "0" -ne $m ]
then
    growlnotify \
        /t:"org habit" \
        /s:true \
        /silent:true \
        "$m habits left."
fi
#+END_SRC

#+BEGIN_SRC emacs-lisp
(defun org-agenda-match-count (str)
 (length
  (org-map-entries t str 'agenda)))
#+END_SRC

Regards.



reply via email to

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