emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: Agenda todo filter order
Date: Fri, 6 May 2011 08:24:58 +0200	[thread overview]
Message-ID: <08D28BBE-80FF-4754-97BB-9674D2EB7CB5@gmail.com> (raw)
In-Reply-To: <87tydthi1x.fsf@norang.ca>

Hi Bernt,

I don't see a compelling reason why these two skipping checks could not
be exchanged:
-----------------------------------------------------------------------------------
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 609edd4..a386a18 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4573,6 +4573,7 @@ the documentation of `org-diary'."
     (goto-char (point-min))
     (while (re-search-forward regexp nil t)
       (catch :skip
+	(org-agenda-skip)
 	(save-match-data
 	  (beginning-of-line)
 	  (setq beg (point) end (save-excursion (outline-next-heading) (point)))
@@ -4581,7 +4582,6 @@ the documentation of `org-diary'."
 	    (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
 	    (throw :skip nil)))
 	(goto-char beg)
-	(org-agenda-skip)
 	(goto-char (match-beginning 1))
 	(setq marker (org-agenda-new-marker (match-beginning 0))
 	      category (org-get-category)
-----------------------------------------------------------------------------------

Does anyone else see a reason why this could cause a problem?

Bernt, maybe just try out this patch and report back?

- Carsten


On 20.4.2011, at 02:39, Bernt Hansen wrote:

> <Sorry for the double post - hit C-c C-s in Gnus trying to set the
> scheduled date and that sends the message... oops>
> 
> Hi Carsten,
> 
> I'm trying to tune my shiny new block agenda so it has a section that
> displays non-project tasks without a scheduled date or deadline date in
> the future.
> 
> I have a non-standard skipping function that skips project trees which
> I'm using in this agenda so what is left should only be non-project
> tasks.  My agenda with only this non-standard skipping function works
> perfectly and gives me a list of only non-project tasks.
> 
> I don't really want to see non-project tasks with a scheduled or
> deadline date in the future.  I added org-agenda-todo-ignore-scheduled
> and org-agenda-todo-ignore-deadlines to 'future to this agenda view and
> now I get extra project tasks in the list which is incorrect.
> 
> It seems the org-agenda-todo-ignore-scheduled (and deadlines) vars are
> applied to the list of todo tasks first -- so any projects that have a
> scheduled or deadline date are skipped (but not the entire tree - just
> the top-level project task) -- this makes all of the project subtasks
> appear in my 'non-project' task list which is wrong.
> 
> If the non-standard skipping function was applied first and then the
> test for scheduled/deadline I think it work work the way I want.  Is
> this hard to change?
> 
> Example:
> 
> --8<---------------cut here---------------start------------->8---
> * TODO Project task
>  SCHEDULED: <2011-04-12 Tue>
> ** TODO Subtask 1
> ** TODO Subtask 2
> * TODO Non project task
> * TODO Another non-project-task
>  DEADLINE: <2011-06-03 Fri>
> * TODO Some future non-project task
>  SCHEDULED: <2011-06-18 Sat>
> --8<---------------cut here---------------end--------------->8---
> 
> My agenda view for non-project tasks should show only
> 
> * TODO Non project task
> * TODO Another non-project-task
> * TODO Some future non-project task
> 
> but with (setq org-agenda-todo-ignore-scheduled 'future) the top level
> 'Project task' is skipped and 'Subtask 1' show up (and is considered not
> a project since it has no subtasks)
> 
> If this can't be changed for some technical reason I guess I can make my
> skipping function more intelligent and look up the hierarchy as well to
> make sure this task is not under some other project task but I didn't
> think that would be necessary to accomplish what I want.
> 
> Do you have any suggestions for how I get to my desired end result?
> 
> Regards,
> Bernt

  reply	other threads:[~2011-05-06  6:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20  0:33 Agenda todo filter order Bernt Hansen
2011-04-20  0:39 ` Bernt Hansen
2011-05-06  6:24   ` Carsten Dominik [this message]
2011-05-06 17:40     ` Bernt Hansen
2011-05-08  6:03       ` Carsten Dominik
2011-05-08 14:49         ` Bernt Hansen
2011-05-08 15:55         ` Bernt Hansen
2011-05-08 16:01           ` Bernt Hansen
     [not found]             ` <11B052C5-6EC9-4B0A-A0FA-631908E50007@gmail.com>
     [not found]               ` <87liyhf459.fsf@norang.ca>
2011-05-10  6:59                 ` Carsten Dominik
2011-05-10 12:39                   ` Bernt Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08D28BBE-80FF-4754-97BB-9674D2EB7CB5@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).