emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christopher Genovese <genovese@cmu.edu>
To: emacs-orgmode@gnu.org
Subject: new tag query parser [4/5] -- a few ``illuminating'' examples
Date: Thu, 16 Aug 2012 00:02:52 -0400	[thread overview]
Message-ID: <CAPum5FhP0J8CeG2gGV07ej_8ATaGXJAQp5S6dN41sT8WpqgbiA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2331 bytes --]

#+TITLE: New Tag Query Parser: A Few Illuminating Examples

This post is structured as an org file with the example commands listed
Copy this to a buffer and try the commands below on that buffer.

* Preliminaries  Point 207

  The Point # labels on the headings give the point values for the
  beginning of the heading. To make this accurate, we need to
  standardize tag placemnet. Using M-: or equivalent means,
  execute the following in this buffer:

  #+begin_src emacs-lisp
  (set (make-local-variable 'org-tags-column) -80)
  (set (make-local-variable 'org-todo-keywords)
           '((sequence "TODO" "WAIT" "DONE")))

  If necessary, do C-u C-c on a headline to realign the tags.

* Parenthesized Expressions Point 714

  Fully parenthesized expressions are allowed in the tag query strings.
  A - selector before the parenthesized expression acts as a logical
  not. These expressions can include an old-style /!? todo-query string
  as well, which extends to the closing paren.

** TODO Paren Examples Point 1057

   + (org-map-entries 'point "(example&HEADING={^Paren}/TODO)")
   + (org-map-entries 'point "HEADING={Paren} & -(extra | LEVEL = 1)")
   + (org-map-entries 'point "(feature | LEVEL == 2)({^p}/WAIT|TODO)")

   The first two should give 1057, the third (1057 1492).

* Another Point 1411
** WAIT This is not a feature example Point 1492
** We can manipulate and combine whole expressions Point 1573

   + (org-map-entries 'point "-(feature&LEVEL=2)")
   + (org-map-entries 'point "-(feature|LEVEL==2)|{^$}")

  Note that inheritance can affects the tag matches; it might
  be nice to be able to distinguish this in searches.
  Note also that the original matcher fails silently here.

* Braces and Spaces AAA  Point 1921
** DONE Just a marker AAAAAA Point 2002
** TODO Simple Examples AAAA Point 2042
   + (org-map-entries 'point "example & TODO <> \"DONE\")
   + (org-map-entries 'point "example/!")
   + (org-map-entries 'point "example | HEADING = { A\\{{3,4\\}}[^A]}")
   + Allows = or == for equality operator.
** [#A] Ok Point 2338
** [#B] This is fast Point 2360

   + (org-map-entries 'point "PRIORITY=\"B\"")

Many more examples are available in the test suite. Do C-u M-x
to see them.

[-- Attachment #2: Type: text/html, Size: 8123 bytes --]

                 reply	other threads:[~2012-08-16  4:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

  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=CAPum5FhP0J8CeG2gGV07ej_8ATaGXJAQp5S6dN41sT8WpqgbiA@mail.gmail.com \
    --to=genovese@cmu.edu \
    --cc=emacs-orgmode@gnu.org \


* 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


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