Hi Kashyap,
sorry, I was busy! I did not find the time to install and deeply check all your
code.
> 1. Query all open items that have the given tag
>> I think I have a workaround for my question 1 :) - if I use the status as
>> an inline relation instead of a link that is.
I think it makes no difference. It is OK if the status is an object.
(collect 'tgs '+Item (db 'nm '+Tag "foo"))
or
(mapcan
'((Tag)
(collect 'tgs '+Item Tag) )
(collect 'nm '+Tag "foo") )
> 2. Query all items that have "ALL" the given tags - for example all
> items tagged with RED and GREEN -> this should only generate ITEM3
Doesn't the above 'mapcan' do that?
> Okay - I've got the answer to the second question as well. I am not sure of
> the efficiency though - I essentially collect all items that have the tag
> RED and then collect all the items that have the BLUE and then do "sect" on
> the output lists. Is this reasonable?
>
>
> (setq L1 (mapcar '( (I) (get I 'itm)) (collect 'nm '+Tag "BLUE")))
>
> (setq L2 (mapcar '( (I) (get I 'itm)) (collect 'nm '+Tag "RED")))
Yes, I would just write
(mapcar '((This) (: itm)) (collect 'nm '+Tag "BLUE"))
but using the advantage of 'collect', the following should give the same
result:
(collect 'nm '+Tag "BLUE" NIL T 'itm)
☺/ A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe