From mboxrd@z Thu Jan 1 00:00:00 1970 From: joakim@verona.se Subject: Re: Is is possible to summarize contents of a task in the agenda headings? Date: Mon, 06 May 2019 10:09:59 +0200 Message-ID: <871s1cqa08.fsf@chopper> References: <87tver9ran.fsf@chopper> <87tveo7bw8.fsf@chopper> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNYhM-00035C-5k for emacs-orgmode@gnu.org; Mon, 06 May 2019 04:10:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNYhL-0000ce-62 for emacs-orgmode@gnu.org; Mon, 06 May 2019 04:10:08 -0400 Received: from smtp.outgoing.loopia.se ([194.9.95.112]:56237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNYhK-0000bQ-S7 for emacs-orgmode@gnu.org; Mon, 06 May 2019 04:10:07 -0400 Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 52A2E1F1A843 for ; Mon, 6 May 2019 10:10:01 +0200 (CEST) In-Reply-To: (David Masterson's message of "Fri, 26 Apr 2019 03:39:45 +0000") 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" To: David Masterson Cc: "emacs-orgmode@gnu.org" Hello, I made some progress. I can generate agendas where each todo shows how many sub-tasks it has: Emacs ideas < 3> Emacs: TODO [#0] show context of subtasks in agenda < 1> Emacs: TODO [#0] fixate gnus structure < 1> Emacs: TODO [#2] kungsgetens org-brain < 11> Emacs: TODO [#3] emslaved (make initial repo) The number inside the initial brackets < num > indicate number of open subtasks. I'm also using org-super-agenda here. This is the code, a little bit messy still. #+BEGIN_SRC emacs-lisp :tangle yes (defun jv-todoinfo() (let ((numchilds 0)) (save-mark-and-excursion (org-narrow-to-subtree) (setq numchilds (length (--filter (eq 'todo it) (progn (let ((parsetree (org-element-parse-buffer 'headline))) (org-element-map parsetree 'headline (lambda (hl) (org-element-property :todo-type hl)))))))) ;;im not sure why the widen is needed, but otherwise agenda generating breaks (widen)) numchilds)) (setq org-agenda-prefix-format '((agenda . " %i %-20:c%?-12t% s") (timeline . " % s") (todo . " %i <%3(jv-todoinfo)> %-20:c") (tags . " %i %-12:c") (search . " %i %-12:c")) ) #+END_SRC David Masterson writes: > writes: > >> Thanks, I'm already using (setq org-agenda-todo-list-sublevels nil) and >> org-super-agenda. Both reduce clutter which is good. OTOH I now lack >> information about subtasks that has been removed from the agenda >> view. It is this concern i would like to address. > > A bit of work, but, if you set a property name of (say) PARENT on each > parent project and gave it the value of that parent project name, each > child of the parent would pick up the property and then should show up > in an :auto-property group under org-super-agenda-mode (I think). That > might get a bit cluttered, though, if you're doing a deep hierarchy of > projects. > > -- > David -- Joakim Verona joakim@verona.se