Re: [O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Eric S Fraga
On Thursday, 16 Mar 2017 at 10:10, Carsten Dominik wrote:
> Hi Eric,

[...]

> This case turns into
>
> ("d" "diary" entry
>(file+olp+datetree "~/s/notes/diary.org")
>"* %^{Appointment} %^G\n%^{Date + time}T"
>:immediate-finish t)
>
> so you only need to change the symbol from file+datetree to file+olp+datetree

Thanks!  Nice and simple.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org 
release_9.0.5-370-g9f3a02.dirty


signature.asc
Description: PGP signature


Re: [O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Carsten Dominik
Hi Alan,

the change is not formally a breaking change, because everything will
continue to work as before.

But yes, such changes are usually documented.

Carsten

On Thu, Mar 16, 2017 at 9:34 AM, Alan Schmitt <
alan.schm...@polytechnique.org> wrote:

> Hello Carsten,
>
> On 2017-03-16 08:55, Carsten Dominik  writes:
>
> > I have just pushed (to master) a patch that modifies the use
> > of date trees in capture templates. If you don't use them,
> > no need to read on.
>
> I can't update till this reaches maint (which I use), but I'll probably
> forget by then. I assume this change will be in NEWS, but is there a
> place where breaking changes are summarized for each release ?
>
> Thanks,
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-02: 406.42, 2016-02: 404.04
>


Re: [O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Carsten Dominik
Hi Eric,



On Thu, Mar 16, 2017 at 10:39 AM, Eric S Fraga  wrote:

> On Thursday, 16 Mar 2017 at 07:55, Carsten Dominik wrote:
> > Dear all,
> >
> > I have just pushed (to master) a patch that modifies the use
> > of date trees in capture templates.
>
> [...]
>
> > For the time being, the old targets will be automatically translated
> > and used correctly. When you use customize to change
> > org-capture-templates, things will automatically be updated next time
> > you change the variable.  The recommendation is to go and update your
> > templates, in case at some time in the future, we might remove the
> > compatibility layer.
>
> Carsten,
>
> would you please post an example of the new format for those that don't
> use customize for capture templates?  An example equivalent to the
> current behaviour would be welcome.
>
> For instance, my current diary appointment capture entry looks like this:
>
>  ("d" "diary" entry
>(file+datetree "~/s/notes/diary.org")
>"* %^{Appointment} %^G\n%^{Date + time}T"
>:immediate-finish t)
>

This case turns into

("d" "diary" entry
   (file+olp+datetree "~/s/notes/diary.org")
   "* %^{Appointment} %^G\n%^{Date + time}T"
   :immediate-finish t)

so you only need to change the symbol from file+datetree to
file+olp+datetree

If you were using a week tree, the symbol you'd still use file+olp+datetree
but also set the property

:tree-type week

If you are using one of the +prompt version, you would instead set the
property

   :time-prompt t

That is all.

If you want to specify an outline path, these are just additional strings
after the file name, for example

("d" "diary" entry
   (file+olp+datetree "~/s/notes/diary.org" "Heading 1" "Subheading"
"subsubheading")
   "* %^{Appointment} %^G\n%^{Date + time}T"
   :immediate-finish t)

Does that answer your question?

Carsten


Re: [O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Eric S Fraga
On Thursday, 16 Mar 2017 at 07:55, Carsten Dominik wrote:
> Dear all,
>
> I have just pushed (to master) a patch that modifies the use
> of date trees in capture templates.  

[...]

> For the time being, the old targets will be automatically translated
> and used correctly. When you use customize to change
> org-capture-templates, things will automatically be updated next time
> you change the variable.  The recommendation is to go and update your
> templates, in case at some time in the future, we might remove the
> compatibility layer.

Carsten,

would you please post an example of the new format for those that don't
use customize for capture templates?  An example equivalent to the
current behaviour would be welcome.

For instance, my current diary appointment capture entry looks like this:

 ("d" "diary" entry
   (file+datetree "~/s/notes/diary.org")
   "* %^{Appointment} %^G\n%^{Date + time}T"
   :immediate-finish t)

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-363-gc41c2b


signature.asc
Description: PGP signature


Re: [O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Alan Schmitt
Hello Carsten,

On 2017-03-16 08:55, Carsten Dominik  writes:

> I have just pushed (to master) a patch that modifies the use 
> of date trees in capture templates. If you don't use them,
> no need to read on.

I can't update till this reaches maint (which I use), but I'll probably
forget by then. I assume this change will be in NEWS, but is there a
place where breaking changes are summarized for each release ?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-02: 406.42, 2016-02: 404.04


signature.asc
Description: PGP signature


[O] Subject: Use of date trees in Capture has been modified

2017-03-16 Thread Carsten Dominik
Dear all,

I have just pushed (to master) a patch that modifies the use
of date trees in capture templates.  If you don't use them,
no need to read on.

We used to have 4 different capture targets that work with date trees:
file+datetree, file+datetree+prompt, file+weektree,
file+weektree+promt.
All these are now consolidated to a single new target,
file+olp+datetree, which also allows for the optional specification of
an outline-path to build the tree under a specific headline instead of
at top level in the target file.  In this way, you can have several
date trees in a file.  The type of tree (month or iso-week) is now
controlled with a property :tree-type, the option to force a
date/time prompt is controlled by the property :time-prompt.

For the time being, the old targets will be automatically translated
and used correctly. When you use customize to change
org-capture-templates, things will automatically be updated next time
you change the variable.  The recommendation is to go and update your
templates, in case at some time in the future, we might remove the
compatibility layer.

Let me know if any issues arise.

Carsten