From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Nilsson Subject: Re: stuck projects and org-agenda-dim-blocked-tasks Date: Wed, 27 Oct 2010 21:48:04 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0511656089==" Return-path: Received: from [140.186.70.92] (port=39147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBC9Q-0005y6-Aj for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 15:59:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBByg-0003be-1T for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 15:48:08 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:51923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBByf-0003bV-T0 for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 15:48:05 -0400 Received: by qwi2 with SMTP id 2so1080133qwi.0 for ; Wed, 27 Oct 2010 12:48:05 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0511656089== Content-Type: multipart/alternative; boundary=001636834070fc024304939e8062 --001636834070fc024304939e8062 Content-Type: text/plain; charset=ISO-8859-1 2010/10/27 Magnus Nilsson > Dear all, > > I now use > (setq org-agenda-dim-blocked-tasks 'invisible) > in order to not see parent tasks and tasks further down in ordered task > lists. I like this. > > But I would still really like to see stuck projects with > (org-agenda-list-stuck-projects) > > With the above setting, however, they unfortunately also become invisible. > > How can I meet both my requirements: > 1. Keep parent tasks invisible > 2. Show stuck projects. > > Does anyone have a solution to my problem? > > Best, > Magnus > I made a working solution to my above requirements through a quick hack that seems to work. Not the prettiest solution, but I thought I'd post it if anyone else is interested in the same requirements. I'd be happy to hear if anyone has got a better solution, or if I have missed something related in the manual. I simply redefined org-finalize-agenda in my .emacs file to: (defun org-finalize-agenda () "Finishing touch for the agenda buffer, called just before displaying it. NOTE: I have deliberately changed this function to only make blocked tasks invisible for the todo-list (if org-agenda-dim-blocked-tasks is set to 'invisible). Compare with the original org-finalize-agenda function. /Magnus" (unless org-agenda-multi (save-excursion (let ((inhibit-read-only t)) (goto-char (point-min)) (while (org-activate-bracket-links (point-max)) (add-text-properties (match-beginning 0) (match-end 0) '(face org-link))) (org-agenda-align-tags) (unless org-agenda-with-colors (remove-text-properties (point-min) (point-max) '(face nil)))) (goto-char (point-min)) (let ((todo-listp (looking-at "Global"))) ;; Seems like all todo-lists start with the word 'Global' (if (and (boundp 'org-agenda-overriding-columns-format) org-agenda-overriding-columns-format) (org-set-local 'org-agenda-overriding-columns-format org-agenda-overriding-columns-format)) (if (and (boundp 'org-agenda-view-columns-initially) org-agenda-view-columns-initially) (org-agenda-columns)) (when org-agenda-fontify-priorities (org-agenda-fontify-priorities)) (when (and todo-listp org-agenda-dim-blocked-tasks org-blocker-hook) (org-agenda-dim-blocked-tasks)) (org-agenda-mark-clocking-task) (when org-agenda-entry-text-mode (org-agenda-entry-text-hide) (org-agenda-entry-text-show)) (if (functionp 'org-habit-insert-consistency-graphs) (org-habit-insert-consistency-graphs)) (run-hooks 'org-finalize-agenda-hook) (setq org-agenda-type (org-get-at-bol 'org-agenda-type)) (when (or org-agenda-filter (get 'org-agenda-filter :preset-filter)) (org-agenda-filter-apply org-agenda-filter))) ))) --001636834070fc024304939e8062 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2010/10/27 Magnus Nilsson <magnus.nilsson@alumni.chalmers.se>
Dear all,

I now use
(setq org-agenda-dim-blocked-tasks 'inv= isible)
in order to not see parent tasks and tasks further down in order= ed task lists. I like this.

But I would still really like to see stu= ck projects with
(org-agenda-list-stuck-projects)

With the above setting, however, th= ey unfortunately also become invisible.

How can I meet both my requ= irements:
1. Keep parent tasks invisible
2. Show stuck projects.

Does anyone have a solution to my problem?

Best,
Magnus

I made a working solution to my above require= ments through a quick hack that seems to work.
Not the prettiest soluti= on, but I thought I'd post it if anyone else is interested in the same = requirements.
I'd be happy to hear if anyone has got a better solution, or if I have = missed something related in the manual.
I simply redefined org-finalize-= agenda in my .emacs file to:

(defun org-finalize-agenda ()
=A0 &= quot;Finishing touch for the agenda buffer, called just before
=A0 displaying it.

NOTE: I have deliberately changed this function t= o only make blocked
tasks invisible for the todo-list (if org-agenda-dim= -blocked-tasks is set to 'invisible).
Compare with the original org= -finalize-agenda function. /Magnus"
=A0 (unless org-agenda-multi
=A0=A0=A0 (save-excursion
=A0=A0=A0=A0= =A0 (let ((inhibit-read-only t))
=A0=A0=A0 (goto-char (point-min))
= =A0=A0=A0=A0=A0=A0=A0 (while (org-activate-bracket-links (point-max))
= =A0=A0=A0=A0=A0=A0=A0=A0=A0 (add-text-properties (match-beginning 0) (match= -end 0)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 '(face org-link)))
=A0=A0=A0=A0=A0=A0=A0 (org-agenda= -align-tags)
=A0=A0=A0=A0=A0=A0=A0 (unless org-agenda-with-colors
=A0= =A0=A0=A0=A0=A0=A0=A0=A0 (remove-text-properties (point-min) (point-max) &#= 39;(face nil))))
=A0=A0=A0=A0=A0 (goto-char (point-min))
=A0=A0=A0=A0=A0 (let=A0 ((todo-listp (looking-at "Global"))) ;; S= eems like all todo-lists start with the word 'Global'
=A0=A0=A0= =A0=A0=A0=A0 (if (and (boundp 'org-agenda-overriding-columns-format)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 org-agenda-overriding-col= umns-format)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-set-local 'org-agenda-overriding= -columns-format
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 org-agenda-overriding-columns-format))
=A0=A0= =A0=A0=A0=A0=A0 (if (and (boundp 'org-agenda-view-columns-initially)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 org-agenda-view-columns-i= nitially)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-agenda-columns))
=A0=A0=A0=A0=A0= =A0=A0 (when org-agenda-fontify-priorities
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (= org-agenda-fontify-priorities))
=A0=A0=A0=A0=A0=A0=A0 (when (and todo-li= stp org-agenda-dim-blocked-tasks org-blocker-hook)
=A0=A0=A0=A0=A0=A0=A0= =A0=A0 (org-agenda-dim-blocked-tasks))
=A0=A0=A0=A0=A0=A0=A0 (org-agenda-mark-clocking-task)
=A0=A0=A0=A0=A0=A0= =A0 (when org-agenda-entry-text-mode
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-ag= enda-entry-text-hide)
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-agenda-entry-text= -show))
=A0=A0=A0=A0=A0=A0=A0 (if (functionp 'org-habit-insert-consi= stency-graphs)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-habit-insert-consistency-graphs))=A0=A0=A0=A0=A0=A0=A0 (run-hooks 'org-finalize-agenda-hook)
=A0=A0= =A0=A0=A0=A0=A0 (setq org-agenda-type (org-get-at-bol 'org-agenda-type)= )
=A0=A0=A0=A0=A0=A0=A0 (when (or org-agenda-filter (get 'org-agenda= -filter :preset-filter))
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-agenda-filter-apply org-agenda-filter)))=A0=A0=A0=A0=A0 )))
=A0
--001636834070fc024304939e8062-- --===============0511656089== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0511656089==--