From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: habit-only agenda that doesn't remove tasks when done? Date: Thu, 21 Nov 2013 10:25:26 -0600 Message-ID: <87pppten7t.fsf@earlgrey.lan> References: <87vc798k64.fsf@earlgrey.lan> <87li5anag9.fsf@noman.maa.corp.collab.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjXTM-00064d-FC for Emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:51:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjXTH-0006G4-DT for Emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:51:20 -0500 Received: from li424-160.members.linode.com ([50.116.34.160]:49244 helo=dustycloud.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjXTH-0006Fx-8Y for Emacs-orgmode@gnu.org; Thu, 21 Nov 2013 11:51:15 -0500 In-reply-to: <87li5anag9.fsf@noman.maa.corp.collab.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Noorul Islam K M Cc: Emacs-orgmode noorul@noorul.com writes: > Christopher Allan Webber writes: > >> Hello, >> >> I'd like to have a habit-only agenda view, if possible, that looks a bit >> like: >> >> >> Morning habits >> -------------- >> >> life: TODO Shave [ * * * * !] habit::morning: >> rsi: TODO morning stretches [ ** ** ** *!] habit::morning: >> >> Night habits >> ------------ >> >> life: TODO Exercise [ * * * * !] habit::night: >> >> >> ... and maybe an other category for cathing the rest. >> >> I'd also like to have these habits not drop off the agenda view when I >> move them to DONE if possible. However, I'm getting the sense that this >> isn't possible... it seems like the habit system works with >> agendas-only, and there's no way to say "give me an agenda with only >> these certain things on it". > > Did you try the following custom command? > > ("h" "Habits" tags-todo "STYLE=\"habit\"" > ((org-agenda-overriding-header "Habits") > (org-agenda-sorting-strategy > '(todo-state-down effort-up category-keep)))) > > Thanks and Regards > Noorul Never noticed this reply till now... Yes, I tried it; unfortunately it does not show the habit graph, that only displays in the agenda, and the above version uses tags-todo. I'd like to be able to show habits, *with* the graph though. The only way to do that seems to be through the agenda, and the "match" parameter of agenda custom commands doesn't seem to support the agenda. I finally figured out a solution: #+BEGIN_SRC emacs-lisp (defun cwebber/skip-unless-habit () "Checks to see if the style at point is \"habit\"" (if (not (equal (org-entry-get (point) "STYLE") "habit")) ; Skip till the next heading (progn (outline-next-heading) (1- (point))))) (setq org-agenda-custom-commands '(("h" "Habits" ((agenda "" ((org-habit-show-all-today t) (org-agenda-skip-function 'cwebber/skip-unless-habit))))))) #+END_SRC This solution works. It allows me to pull up just the habits, including those that have already been done today. There's only one thing left to do that would make it awesome, and that would be to make it so that the ones that are now already done said DONE instead of TODO still. Other than that, this seems to be kinda working-ish.