emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* struggle with using variable org-agenda-*-filter* properly
@ 2014-04-28 21:58 Brady Trainor
  2014-04-28 22:17 ` Brady Trainor
  2014-04-29 11:51 ` Bastien
  0 siblings, 2 replies; 4+ messages in thread
From: Brady Trainor @ 2014-04-28 21:58 UTC (permalink / raw)
  To: emacs-orgmode


I am often having difficulties with the various org-agenda filter 
settings, for creating org-agenda-custom-commands. There is not much 
documentation, especially, examples for those new to for instance 
regexp, and Emacs' regexp, and how these work with org's syntax.

In the following agenda-custom-command, I tried to use regexp in 
regexp-filter and tag-filter, but could not succeed. I did successfully 
get the skip-function to work, but I was hoping to clarify if I should 
expect the other variables to work, now or in the future, and/or if you 
could help me understand how to use them properly.


(org-add-agenda-custom-command
  '("h" "habits"
    agenda ""
    ((org-agenda-files '("/e/org/agendas-main.org"))
     (org-agenda-skip-function
      '(org-agenda-skip-entry-if 'notregexp ":STYLE:.+habit"))
     (org-agenda-span 'day)
     ;; (org-agenda-regexp-filter-preset '(":STYLE:.+habit"))
     ;; (org-agenda-tag-filter-preset '("+STYLE=\"habit\""))
     )
    ))

I have tried various permutations of the syntax, but could not make the 
latter two variables work.



Leads:
  - http://orgmode.org/manual/Matching-tags-and-properties.html
    - which links to, 
http://orgmode.org/manual/Special-agenda-views.html#x-agenda-skip-entry-regexp, 
perhaps the intended solution at this time
  - http://orgmode.org/worg/org-tutorials/advanced-searching.html
  - http://www.emacswiki.org/emacs/RegularExpression


Thank you,

Brady

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: struggle with using variable org-agenda-*-filter* properly
  2014-04-28 21:58 struggle with using variable org-agenda-*-filter* properly Brady Trainor
@ 2014-04-28 22:17 ` Brady Trainor
  2014-04-29 11:51 ` Bastien
  1 sibling, 0 replies; 4+ messages in thread
From: Brady Trainor @ 2014-04-28 22:17 UTC (permalink / raw)
  To: emacs-orgmode

On 4/28/2014 2:58 PM, Brady Trainor wrote:
>

Maybe I should have included version:

Org-mode version 8.2.6 (8.2.6-6-gfc37d1-elpa @ 
c:/Users/user-name/AppData/Roaming/.emacs.d/elpa/org-20140428/)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: struggle with using variable org-agenda-*-filter* properly
  2014-04-28 21:58 struggle with using variable org-agenda-*-filter* properly Brady Trainor
  2014-04-28 22:17 ` Brady Trainor
@ 2014-04-29 11:51 ` Bastien
  2014-04-29 19:38   ` Brady Trainor
  1 sibling, 1 reply; 4+ messages in thread
From: Bastien @ 2014-04-29 11:51 UTC (permalink / raw)
  To: Brady Trainor; +Cc: emacs-orgmode

Hi Brady,

Brady Trainor <algebrat@uw.edu> writes:

>     ;; (org-agenda-regexp-filter-preset '(":STYLE:.+habit"))
>     ;; (org-agenda-tag-filter-preset '("+STYLE=\"habit\""))

Filters are applied on the headlines, not on their contents,
because they are applied *after* the agenda is generated.

That's why the first filter above will not work.

Also, "tag" in "org-agenda-tag-filter-preset" means "tag",
not a tag-and/or-property-query.  So it should be something
like this

(org-agenda-tag-filter-preset '("mytag"))

to filter a headline containing the tag "mytag".

Hope this clarifies things up,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: struggle with using variable org-agenda-*-filter* properly
  2014-04-29 11:51 ` Bastien
@ 2014-04-29 19:38   ` Brady Trainor
  0 siblings, 0 replies; 4+ messages in thread
From: Brady Trainor @ 2014-04-29 19:38 UTC (permalink / raw)
  To: emacs-orgmode

On 04/29/2014 04:51 AM, Bastien wrote:
 > Hi Brady,
:
 > Filters are applied on the headlines, not on their contents,
 > because they are applied *after* the agenda is generated.
:
 > Hope this clarifies things up,

Yes, greatly. Thank you.


Brady

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-29 19:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28 21:58 struggle with using variable org-agenda-*-filter* properly Brady Trainor
2014-04-28 22:17 ` Brady Trainor
2014-04-29 11:51 ` Bastien
2014-04-29 19:38   ` Brady Trainor

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).