From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-agenda-todo-ignore-* in tags search of TODO entries Date: Thu, 22 May 2008 22:21:15 +0200 Message-ID: <37DBF576-0933-4F4F-BDE1-020E43ABB6B7@gmail.com> References: <87y765cxfm.fsf@thomasmorgan.net> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzHI8-0007Ll-JO for emacs-orgmode@gnu.org; Thu, 22 May 2008 16:21:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzHI7-0007Jf-Bd for emacs-orgmode@gnu.org; Thu, 22 May 2008 16:21:36 -0400 Received: from [199.232.76.173] (port=50062 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzHI7-0007JR-8I for emacs-orgmode@gnu.org; Thu, 22 May 2008 16:21:35 -0400 Received: from ug-out-1314.google.com ([66.249.92.168]:23797) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JzHI6-0000do-PZ for emacs-orgmode@gnu.org; Thu, 22 May 2008 16:21:35 -0400 Received: by ug-out-1314.google.com with SMTP id l31so618039ugc.48 for ; Thu, 22 May 2008 13:21:32 -0700 (PDT) In-Reply-To: <87y765cxfm.fsf@thomasmorgan.net> 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: Thomas Morgan Cc: Org-mode Mode Hi Thomas, thanks for your patch. what do others think, should these variables also apply to the general tags/todo/properties search? - Carsten On May 20, 2008, at 8:16 AM, Thomas Morgan wrote: > This patch makes org-agenda-todo-ignore-with-date, > org-agenda-todo-ignore-scheduled, and org-agenda-todo-ignore-deadlines > apply to tags searches of TODO entries. Is this the right thing? > > diff --git a/lisp/ChangeLog b/lisp/ChangeLog > index 42382aa..8a9bfbd 100644 > --- a/lisp/ChangeLog > +++ b/lisp/ChangeLog > @@ -1,3 +1,9 @@ > +2008-05-20 Thomas Morgan > + > + * org.el (org-scan-tags): Obey org-agenda-todo-ignore-with-date, > + org-agenda-todo-ignore-scheduled, and > + org-agenda-todo-ignore-deadlines. > + > 2008-05-10 Carsten Dominik > > * org-table.el (orgtbl-to-tsv, orgtbl-to-csv): New functions. > diff --git a/lisp/org.el b/lisp/org.el > index 37dd881..56262d5 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -8878,36 +8878,54 @@ are included in the output." > ;; selective inheritance, remove uninherited ones > (setcdr (car tags-alist) > (org-remove-uniherited-tags (cdar tags-alist)))) > - (when (and (or (not todo-only) (member todo org-not-done- > keywords)) > - (eval matcher) > - (or (not org-agenda-skip-archived-trees) > - (not (member org-archive-tag tags-list)))) > - (and (eq action 'agenda) (org-agenda-skip)) > - ;; list this headline > - > - (if (eq action 'sparse-tree) > - (progn > - (and org-highlight-sparse-tree-matches > - (org-get-heading) (match-end 0) > - (org-highlight-new-match > - (match-beginning 0) (match-beginning 1))) > - (org-show-context 'tags-tree)) > - (setq txt (org-format-agenda-item > - "" > - (concat > - (if org-tags-match-list-sublevels > - (make-string (1- level) ?.) "") > - (org-get-heading)) > - category tags-list) > - priority (org-get-priority txt)) > - (goto-char lspos) > - (setq marker (org-agenda-new-marker)) > - (org-add-props txt props > - 'org-marker marker 'org-hd-marker marker 'org-category category > - 'priority priority 'type "tagsmatch") > - (push txt rtn)) > - ;; if we are to skip sublevels, jump to end of subtree > - (or org-tags-match-list-sublevels (org-end-of-subtree t)))))) > + (let ((end (save-excursion (outline-next-heading) (point)))) > + (when (and (or (not todo-only) > + (and (member todo org-not-done-keywords) > + (or (not org-agenda-todo-ignore-with-date) > + (not (save-excursion > + (re-search-forward > + org-ts-regexp end t)))) > + (or (not org-agenda-todo-ignore-scheduled) > + (not (save-excursion > + (re-search-forward > + org-scheduled-time-regexp end t)))) > + (or (not org-agenda-todo-ignore-deadlines) > + (not (save-excursion > + (re-search-forward > + org-deadline-time-regexp > + end t))) > + (not (org-deadline-close > + (match-string 1)))))) > + (eval matcher) > + (or (not org-agenda-skip-archived-trees) > + (not (member org-archive-tag tags-list)))) > + (and (eq action 'agenda) (org-agenda-skip)) > + ;; list this headline > + > + (if (eq action 'sparse-tree) > + (progn > + (and org-highlight-sparse-tree-matches > + (org-get-heading) (match-end 0) > + (org-highlight-new-match > + (match-beginning 0) (match-beginning 1))) > + (org-show-context 'tags-tree)) > + (setq txt (org-format-agenda-item > + "" > + (concat > + (if org-tags-match-list-sublevels > + (make-string (1- level) ?.) "") > + (org-get-heading)) > + category tags-list) > + priority (org-get-priority txt)) > + (goto-char lspos) > + (setq marker (org-agenda-new-marker)) > + (org-add-props txt props > + 'org-marker marker 'org-hd-marker marker > + 'org-category category > + 'priority priority 'type "tagsmatch") > + (push txt rtn)) > + ;; if we are to skip sublevels, jump to end of subtree > + (or org-tags-match-list-sublevels (org-end-of-subtree t))))))) > (when (and (eq action 'sparse-tree) > (not org-sparse-tree-open-archived-trees)) > (org-hide-archived-subtrees (point-min) (point-max)))