From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: skip entry with inherited tags Date: Fri, 4 Jun 2010 13:27:10 +0200 Message-ID: References: <20100518074232.GA10524@mteege.de> <4BF2778D.9070702@os.inf.tu-dresden.de> <87mxvxdsv7.fsf@fastmail.fm> <4C082225.6020007@os.inf.tu-dresden.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=48034 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKVNj-0005A1-Hl for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 07:48:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKVNe-0007Zr-Mj for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 07:48:11 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:49283) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKVNe-0007XA-Hd for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 07:48:06 -0400 Received: by mail-wy0-f169.google.com with SMTP id 39so896188wyb.0 for ; Fri, 04 Jun 2010 04:48:06 -0700 (PDT) In-Reply-To: <4C082225.6020007@os.inf.tu-dresden.de> 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: Martin Pohlack Cc: Matt Lundin , emacs-orgmode@gnu.org Hi Martin, maybe you can summarize this discussion so that I can see when should be done? Thanks. - Carsten On Jun 3, 2010, at 11:44 PM, Martin Pohlack wrote: > Hi All, > > I finally found some hours to walk through the code. > > On 18.05.2010 19:25, Matt Lundin wrote: >> Martin Pohlack writes: >> >>> Hi, >>> >>> On 18.05.2010 09:42, Matthias Teege wrote: >>>> Moin, >>>> >>>> I'm using a simple skip-function to exclude todos from a list. >>>> >>>> (defun my-skip-someday-and-scheduled () >>>> "" >>>> (org-agenda-skip-entry-if 'scheduled 'regexp ":SOMEDAY:")) >>>> >>>> That works when the tag was assigned to an entry but not when it >>>> was >>>> inherited from a parent. How do I get all tags for an entry? >>> >>> I have been using the same approach with the same limitations. I >>> stumbled upon the "tags filter preset", which supposedly should >>> filter >>> out headlines with a specific tag set. >>> >>> I tried to set it to "-maybe" but it did not seem to have an effect >>> with the default "Agenda" type. Is this supposed to work? >> >> Did you set the variable as a list? >> >> --8<---------------cut here---------------start------------->8--- >> (setq org-agenda-custom-commands >> '(("x" "No maybe" todo "" >> ((org-agenda-filter-preset '("-maybe")))))) >> --8<---------------cut here---------------end--------------->8--- >> >> BTW, I believe one solution to the original question is: >> >> --8<---------------cut here---------------start------------->8--- >> (setq org-agenda-custom-commands >> '(("x" "No scheduled or someday" todo "" >> ((org-agenda-todo-ignore-scheduled t) >> (org-agenda-filter-preset '("-SOMEDAY")))))) >> --8<---------------cut here---------------end--------------->8--- > > Thanks for your suggestion Matt. > > I now think the problem is that I have a multi-agenda. > > org-finalize-agenda is called for each subagenda here but the branch > where org-agenda-filter-apply would be called is never taken as it is > scoped with "unless org-agenda-multi". I have also found no other > non-interactive trigger for org-agenda-filter-apply. > > I see two possible solutions here: > * Run org-agenda-filter-apply on a narrowed agenda buffer (only for > the sub-agenda). In fact, the agenda buffer seems to be narrowed > down at this point already. This would be the perfect solution as > each sub-agenda could install its own org-agenda-filter-preset. > > Find attached a patch which achieves this. It seems to work well for > my short tests. > > * Run org-agenda-filter-apply once for the whole buffer with a global > org-agenda-filter-preset. This would be mostly ok for some use cases > (I only want to globally remove all "maybe" entries, including the > inherited ones). > > Cheers, > Martin > apply_multi.diff>_______________________________________________ > 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 - Carsten