emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Subject: Use of date trees in Capture has been modified
@ 2017-03-16  7:55 Carsten Dominik
  2017-03-16  8:34 ` Alan Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2017-03-16  7:55 UTC (permalink / raw)
  To: org-mode list

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: Use of date trees in Capture has been modified
  2017-03-16  7:55 Carsten Dominik
@ 2017-03-16  8:34 ` Alan Schmitt
  2017-03-16 11:41   ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2017-03-16  8:34 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode list

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

Hello Carsten,

On 2017-03-16 08:55, Carsten Dominik <dominik@uva.nl> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: Use of date trees in Capture has been modified
       [not found] <59779b8073fa4f0683216c82e6ec9cce@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-16  9:39 ` Eric S Fraga
  2017-03-16 10:10   ` Carsten Dominik
       [not found]   ` <b855abbe7ad14fcfbd3f76767d8a4a0b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Eric S Fraga @ 2017-03-16  9:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: Use of date trees in Capture has been modified
  2017-03-16  9:39 ` Subject: Use of date trees in Capture has been modified Eric S Fraga
@ 2017-03-16 10:10   ` Carsten Dominik
       [not found]   ` <b855abbe7ad14fcfbd3f76767d8a4a0b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2017-03-16 10:10 UTC (permalink / raw)
  To: Eric S Fraga, org-mode list

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

Hi Eric,



On Thu, Mar 16, 2017 at 10:39 AM, Eric S Fraga <e.fraga@ucl.ac.uk> 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

[-- Attachment #2: Type: text/html, Size: 3129 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: Use of date trees in Capture has been modified
  2017-03-16  8:34 ` Alan Schmitt
@ 2017-03-16 11:41   ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2017-03-16 11:41 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: org-mode list

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

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.schmitt@polytechnique.org> wrote:

> Hello Carsten,
>
> On 2017-03-16 08:55, Carsten Dominik <dominik@uva.nl> 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
>

[-- Attachment #2: Type: text/html, Size: 1427 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: Use of date trees in Capture has been modified
       [not found]   ` <b855abbe7ad14fcfbd3f76767d8a4a0b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-16 19:12     ` Eric S Fraga
  0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2017-03-16 19:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

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<http://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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-16 22:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <59779b8073fa4f0683216c82e6ec9cce@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-16  9:39 ` Subject: Use of date trees in Capture has been modified Eric S Fraga
2017-03-16 10:10   ` Carsten Dominik
     [not found]   ` <b855abbe7ad14fcfbd3f76767d8a4a0b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-16 19:12     ` Eric S Fraga
2017-03-16  7:55 Carsten Dominik
2017-03-16  8:34 ` Alan Schmitt
2017-03-16 11:41   ` Carsten Dominik

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).