emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ben Alexander <bva@alexanderonline.org>
To: emacs-orgmode Org-Mode <emacs-orgmode@gnu.org>
Subject: Help with org-map-entries and property searches
Date: Wed, 17 Dec 2008 14:55:52 +0000	[thread overview]
Message-ID: <67E77E1F-4917-4AF6-9161-42EE49D8721F@alexanderonline.org> (raw)

Hi,

I'm trying to code lisp, and it's slow going for me.  I was hoping  
someone with a few spare cycles could explain why this doesn't work  
the way I expect.  I typed the following code into an org file and hit  
C-x C-e (eval-last-sexp):

(length (org-map-entries t "+LEDGER=\"entry\""))                      
=> 1
(length (org-map-entries t "+LEDGER=\"transaction\""))                
=> 2

This looks good: I do have two headlines with a property called LEDGER  
where the value is "transaction" (no quotes)

However, all of the following attempts to search for both kinds of (or  
all) values fail (no error, just the wrong value).  What am I doing  
wrong?

(length (org-map-entries t "+LEDGER={\"transaction\"\|\"entry\"}"))   
=> 0
(length (org-map-entries t "+LEDGER={transaction\|entry}"))           
=> 0
(length (org-map-entries t "+LEDGER=entry"))                          
=> 0
(length (org-map-entries t "+LEDGER"))                                
=> 0

I was inspired by this example of a property search from the org info  
page (section 7.3)

      +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2         \
               +With={Sarah\|Denny}+SCHEDULED>="<2008-10-11>"

I've tried this in
GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of  
2008-09-21 on plume.sr.unh.edu - Aquamacs Distribution 1.5
and
GNU Emacs 22.3.1 (i386-apple-darwin9.5.1, Carbon Version 1.6.0) of  
2008-11-07 on Xander.local (compiled via MacPorts)

Org-mode version 6.15a in both.

I also got the same results when I did it after a 'start-vanilla- 
aquamacs' (thanks to William Henney for the tip!)

Thanks,
Ben

             reply	other threads:[~2008-12-17 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 14:55 Ben Alexander [this message]
2008-12-17 15:46 ` Help with org-map-entries and property searches Bernt Hansen
2008-12-17 15:51   ` Ben Alexander

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=67E77E1F-4917-4AF6-9161-42EE49D8721F@alexanderonline.org \
    --to=bva@alexanderonline.org \
    --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).