From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Allowing multiple date trees in a single file Date: Tue, 17 Jan 2017 13:19:56 +0100 Message-ID: References: <87wpdv4fdq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0b1ddea475f1054649529d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTSkO-000699-3w for emacs-orgmode@gnu.org; Tue, 17 Jan 2017 07:20:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTSkN-0006WW-0s for emacs-orgmode@gnu.org; Tue, 17 Jan 2017 07:20:20 -0500 Received: from mail-it0-x229.google.com ([2607:f8b0:4001:c0b::229]:36835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTSkM-0006Vv-SA for emacs-orgmode@gnu.org; Tue, 17 Jan 2017 07:20:18 -0500 Received: by mail-it0-x229.google.com with SMTP id c7so93632076itd.1 for ; Tue, 17 Jan 2017 04:20:17 -0800 (PST) In-Reply-To: <87wpdv4fdq.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: org-mode list --94eb2c0b1ddea475f1054649529d Content-Type: text/plain; charset=UTF-8 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 wrote: > Hello, > > Carsten Dominik 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 > --94eb2c0b1ddea475f1054649529d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 e= xception is that if you have an Org entry with a property=C2=A0
<= br>
DATE_TREE: t

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

Ano= ther way to implement this would be to use different VALUES for the DATE_TR= EE/WEEK_TREE property - maybe that would actually be a somewhat cleaner imp= lementation.

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 tr= ees
> in a single file by allowing to specify the property name that will be= used
> to place the tree.=C2=A0 The property name can be set in org-capture-t= emplates,
> individually for every template if so desired.=C2=A0 I use that to hav= e 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 bein= g
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 i= nclude
your new property ?

Regards,

--
Nicolas Goaziou

--94eb2c0b1ddea475f1054649529d--