* org-map-entries - wrong use or bug?
@ 2013-06-14 18:34 Thorsten Jolitz
2013-06-14 18:38 ` Thorsten Jolitz
2013-06-14 18:55 ` Nick Dokos
0 siblings, 2 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2013-06-14 18:34 UTC (permalink / raw)
To: emacs-orgmode
Hi List,
I tried out `org-map-entries' with this file
,------------------------------------------------
| * my todos
| ** TODO get things done
| ** TODO take care of things
| ** DONE procrastinate when tasks are unpleasant
| ** DONE delegate really unpleasant tasks
`------------------------------------------------
with an example similar to the one in "Appendix A: Hacking" in the Org
manual
,--------------------------------------
| M: (length (org-map-entries t "\+Done"))
`--------------------------------------
but result is '0' while it should be '2'.
I debugged the function and it seems that the matcher does not match.
These are my todo keywords
,----------------------------------------------------------------------------
| Result: "...\\(TODO\\|NEXT\\|DONE\\|WAITING\\|HOLD\\|CANCELLED\\|PHONE\\)...
`----------------------------------------------------------------------------
and this is the matcher
,----------------------------------------------------------------------
| (and (progn (setq org-cached-props nil) (member "DONE" tags-list)) t)
`----------------------------------------------------------------------
as evaluated on line line 13863 of org.el.
Wrong use of `org-map-entries' or is there a bug?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 18:34 org-map-entries - wrong use or bug? Thorsten Jolitz
@ 2013-06-14 18:38 ` Thorsten Jolitz
2013-06-14 18:55 ` Nick Dokos
1 sibling, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2013-06-14 18:38 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@gmail.com> writes:
> ,--------------------------------------
> | M: (length (org-map-entries t "\+Done"))
> `--------------------------------------
sorry, I actually used DONE not Done, but result is still '0' while it
should be '2'.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 18:34 org-map-entries - wrong use or bug? Thorsten Jolitz
2013-06-14 18:38 ` Thorsten Jolitz
@ 2013-06-14 18:55 ` Nick Dokos
2013-06-14 18:59 ` Thorsten Jolitz
2013-06-14 19:28 ` Thorsten Jolitz
1 sibling, 2 replies; 9+ messages in thread
From: Nick Dokos @ 2013-06-14 18:55 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@gmail.com> writes:
>
> ,--------------------------------------
> | M: (length (org-map-entries t "\+Done"))
> `--------------------------------------
>
Try
(org-map-entries t "/+DONE" nil)
Note the slash.
> but result is '0' while it should be '2'.
>
--
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 18:55 ` Nick Dokos
@ 2013-06-14 18:59 ` Thorsten Jolitz
2013-06-14 19:28 ` Thorsten Jolitz
1 sibling, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2013-06-14 18:59 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>>
>> ,--------------------------------------
>> | M: (length (org-map-entries t "\+Done"))
>> `--------------------------------------
>>
>
> Try
>
> (org-map-entries t "/+DONE" nil)
>
> Note the slash.
Oh yes, I see, thank you!
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 18:55 ` Nick Dokos
2013-06-14 18:59 ` Thorsten Jolitz
@ 2013-06-14 19:28 ` Thorsten Jolitz
2013-06-14 19:47 ` Nick Dokos
1 sibling, 1 reply; 9+ messages in thread
From: Thorsten Jolitz @ 2013-06-14 19:28 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
One more question: what would be the syntax for matching a property? I
could not find a single example of this in the whole org-mode/lisp/
directory.
Imagine the doc looks like this:
,--------------------------------------------------------
| * my todos
| ** get things done
| :PROPERTIES:
| :author: My Name
| :END:
| ** take care of things
| ** procrastinate when tasks are unpleasant
| ** delegate really unpleasant tasks :repeat:
`--------------------------------------------------------
By trial-and-error I found out that tags match like this:
,--------------------------------------
| M: (length (org-map-entries t "repeat"))
`--------------------------------------
but for the property I get result 0 except with
,--------------------------------------
| M: (length (org-map-entries t "/*author"))
`--------------------------------------
or
,--------------------------------------
| M: (length (org-map-entries t "/-author"))
`--------------------------------------
which return 5.
Whats the syntax in this case?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 19:28 ` Thorsten Jolitz
@ 2013-06-14 19:47 ` Nick Dokos
2013-06-14 19:52 ` Nick Dokos
2013-06-14 19:57 ` Thorsten Jolitz
0 siblings, 2 replies; 9+ messages in thread
From: Nick Dokos @ 2013-06-14 19:47 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Nick Dokos <ndokos@gmail.com> writes:
>
>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
> One more question: what would be the syntax for matching a property? I
> could not find a single example of this in the whole org-mode/lisp/
> directory.
>
Use the docs, Luke!
(info "(org) Matching tags and properties")
> Imagine the doc looks like this:
>
> ,--------------------------------------------------------
> | * my todos
> | ** get things done
> | :PROPERTIES:
> | :author: My Name
> | :END:
> | ** take care of things
> | ** procrastinate when tasks are unpleasant
> | ** delegate really unpleasant tasks :repeat:
> `--------------------------------------------------------
>
> By trial-and-error I found out that tags match like this:
>
> ,--------------------------------------
> | M: (length (org-map-entries t "repeat"))
> `--------------------------------------
>
> but for the property I get result 0 except with
>
> ,--------------------------------------
> | M: (length (org-map-entries t "/*author"))
> `--------------------------------------
>
> or
>
> ,--------------------------------------
> | M: (length (org-map-entries t "/-author"))
> `--------------------------------------
>
> which return 5.
>
> Whats the syntax in this case?
--
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 19:47 ` Nick Dokos
@ 2013-06-14 19:52 ` Nick Dokos
2013-06-27 15:28 ` Bastien
2013-06-14 19:57 ` Thorsten Jolitz
1 sibling, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2013-06-14 19:52 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>> One more question: what would be the syntax for matching a property? I
>> could not find a single example of this in the whole org-mode/lisp/
>> directory.
>>
>
> Use the docs, Luke!
>
> (info "(org) Matching tags and properties")
>
>
There probably should be a link from the "Using the mapping API" section
to the "Matching tags and properties" section. I thought there was one,
but I just checked and didn't see it.
--
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 19:47 ` Nick Dokos
2013-06-14 19:52 ` Nick Dokos
@ 2013-06-14 19:57 ` Thorsten Jolitz
1 sibling, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2013-06-14 19:57 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>> One more question: what would be the syntax for matching a property? I
>> could not find a single example of this in the whole org-mode/lisp/
>> directory.
>>
>
> Use the docs, Luke!
>
> (info "(org) Matching tags and properties")
Ah, great, thanks again, thats what I needed. Did not realize that there
is another section about this topic, I thought Appendix A and the source
code is the only info available.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-map-entries - wrong use or bug?
2013-06-14 19:52 ` Nick Dokos
@ 2013-06-27 15:28 ` Bastien
0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2013-06-27 15:28 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Hi Nick,
Nick Dokos <ndokos@gmail.com> writes:
> There probably should be a link from the "Using the mapping API" section
> to the "Matching tags and properties" section. I thought there was one,
> but I just checked and didn't see it.
Please feel free to add it if needed!
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-27 15:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 18:34 org-map-entries - wrong use or bug? Thorsten Jolitz
2013-06-14 18:38 ` Thorsten Jolitz
2013-06-14 18:55 ` Nick Dokos
2013-06-14 18:59 ` Thorsten Jolitz
2013-06-14 19:28 ` Thorsten Jolitz
2013-06-14 19:47 ` Nick Dokos
2013-06-14 19:52 ` Nick Dokos
2013-06-27 15:28 ` Bastien
2013-06-14 19:57 ` Thorsten Jolitz
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).