Hi Nicolas,

thanks for your reaction.

By default, a day or week tree will assume that it is the only thing in a file when it is created and handled.
The exception is that if you have an Org entry with a property 

DATE_TREE: t

that the date tree will be placed under that specific node.  But since this is a specific property (key, not value), there was no way to target a different Org node as parent for a tree.  This is now possible.

Another way to implement this would be to use different VALUES for the DATE_TREE/WEEK_TREE property - maybe that would actually be a somewhat cleaner implementation.

I'll rethink that and I will also define a test.

Carsten

On Mon, Jan 16, 2017 at 8:45 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Carsten Dominik <dominik@uva.nl> writes:

> here is a patch that allows to have multiple date trees or iso-week trees
> in a single file by allowing to specify the property name that will be used
> to place the tree.  The property name can be set in org-capture-templates,
> individually for every template if so desired.  I use that to have three
> different kind of journals in a single file.
>
> Any objections gains me to merge this change into Master?

AFAIR, WEEK_TREE and DATE_TREE allow to select the type of tree being
inserted. How is the new property allowing to do the same?

Also, there are some tests defined in "test-org-capture.el" and
"test-org-datetree.el". Would you mind extending those so as to include
your new property ?

Regards,

--
Nicolas Goaziou