* Capture template datetree of type week
@ 2024-11-19 2:43 Sébastien Gendre
2024-11-19 2:53 ` Sébastien Gendre
0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2024-11-19 2:43 UTC (permalink / raw)
To: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
Hello,
I tried to set a new capture template with a target `file+olp+datetree`
and the property `:tree-type` set to `week`. But Org-mode act as it's
set to `day`.
Here is my capture template
…
("j" "Weekly Journal"
entry
(file+olp+datetree "~/Org/Weekly Journal.org")
(file "~/Org/Templates/Journal Entry.org")
:tree-type week
:empty-lines 1)
…
The result datetree group my items per days.
If I set `:tree-type` to `month`, my items are grouped per month.
Did I do something wrong ?
My version of Org is 9.7.15 and Emacs is 29.4.
Best regards
-------
Gendre Sébastien
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Capture template datetree of type week
2024-11-19 2:43 Capture template datetree of type week Sébastien Gendre
@ 2024-11-19 2:53 ` Sébastien Gendre
2024-11-22 18:10 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2024-11-19 2:53 UTC (permalink / raw)
To: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
Ha, my bad.
If I set `:tree-type` to `week`, it actually create a week heading but
keep creating a sub heading for the day.
I thought it would create only year and week heading on top of my
entries.
What I get is :
* Year
** Week
*** Day
**** Item 1
**** Item 2
What I thought I will got:
* Year
** Week
*** Item 1
*** Item 2
Is it possible to configure my capture template to have the second one ?
Sébastien Gendre <seb@k-7.ch> writes:
> [[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre <seb@k-7.ch> (trust ultimate) created at 2024-11-19T03:43:01+0100 using RSA]]
> Hello,
>
> I tried to set a new capture template with a target `file+olp+datetree`
> and the property `:tree-type` set to `week`. But Org-mode act as it's
> set to `day`.
>
>
> Here is my capture template
>
> …
> ("j" "Weekly Journal"
> entry
> (file+olp+datetree "~/Org/Weekly Journal.org")
> (file "~/Org/Templates/Journal Entry.org")
> :tree-type week
> :empty-lines 1)
> …
>
> The result datetree group my items per days.
>
> If I set `:tree-type` to `month`, my items are grouped per month.
>
> Did I do something wrong ?
>
> My version of Org is 9.7.15 and Emacs is 29.4.
>
>
>
> Best regards
>
> -------
> Gendre Sébastien
>
> [[End of PGP Signed Part]]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Capture template datetree of type week
2024-11-19 2:53 ` Sébastien Gendre
@ 2024-11-22 18:10 ` Ihor Radchenko
2024-11-22 23:26 ` Sébastien Gendre
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2024-11-22 18:10 UTC (permalink / raw)
To: Sébastien Gendre; +Cc: Org Mode List
Sébastien Gendre <seb@k-7.ch> writes:
> ...
> What I thought I will got:
>
> * Year
> ** Week
> *** Item 1
> *** Item 2
>
> Is it possible to configure my capture template to have the second one ?
The best you can do is overriding `org-datetree-find-iso-week-create'
function around your capture call with cl-letf.
If you look into the source code of `org-datetree-find-iso-week-create',
you will see that it is easy to modify it so that it does not create
date heading.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Capture template datetree of type week
2024-11-22 18:10 ` Ihor Radchenko
@ 2024-11-22 23:26 ` Sébastien Gendre
0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Gendre @ 2024-11-22 23:26 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Thank you very much. I will look at it.
Ihor Radchenko <yantar92@posteo.net> writes:
> Sébastien Gendre <seb@k-7.ch> writes:
>
>> ...
>> What I thought I will got:
>>
>> * Year
>> ** Week
>> *** Item 1
>> *** Item 2
>>
>> Is it possible to configure my capture template to have the second one ?
>
> The best you can do is overriding `org-datetree-find-iso-week-create'
> function around your capture call with cl-letf.
>
> If you look into the source code of `org-datetree-find-iso-week-create',
> you will see that it is easy to modify it so that it does not create
> date heading.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-22 23:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 2:43 Capture template datetree of type week Sébastien Gendre
2024-11-19 2:53 ` Sébastien Gendre
2024-11-22 18:10 ` Ihor Radchenko
2024-11-22 23:26 ` Sébastien Gendre
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).