Hello, is this possible with org-mode? Given a tree: * Name :PROPERTIES: :ARCHIVE: ??? :END: ** Archive :ARCHIVE: ** Some node Upon archiving "Some node" (or any direct or indirect sub-node of Projectname) I want to end it up under "** Archive". The archive location should always be relative to the node where the property ARCHIVE is set. The documentation org-archive-location does not suggest that is possible. Is that possible? Thanks, Florian
Am 25.02.21 um 21:22 schrieb Florian Lindner:
> is this possible with org-mode? Given a tree:
>
> * Name
> :PROPERTIES:
> :ARCHIVE: ???
> :END:
> ** Archive :ARCHIVE:
> ** Some node
>
> Upon archiving "Some node" (or any direct or indirect sub-node of
> Projectname) I want to end it up under "** Archive". The archive
> location should always be relative to the node where the property
> ARCHIVE is set.
>
> The documentation org-archive-location does not suggest that is possible.
An alternative idea would be a setting for the ARCHIVE property that
searches the tree upward until it finds a node with an :ARCHIVE: tag and
use that as archive location. Maybe indicated by a setting of "::%a".
What do you think?
On 2021-02-25 15:49, Florian Lindner wrote:
> Am 25.02.21 um 21:22 schrieb Florian Lindner:
>> is this possible with org-mode? Given a tree:
>>
>> * Name
>> :PROPERTIES:
>> :ARCHIVE: ???
>> :END:
>> ** Archive :ARCHIVE:
>> ** Some node
>>
>> Upon archiving "Some node" (or any direct or indirect sub-node of
>> Projectname) I want to end it up under "** Archive". The archive
>> location should always be relative to the node where the property
>> ARCHIVE is set.
>>
>> The documentation org-archive-location does not suggest that is
>> possible.
>
> An alternative idea would be a setting for the ARCHIVE property that
> searches the tree upward until it finds a node with an :ARCHIVE: tag
> and use that as archive location. Maybe indicated by a setting of
> "::%a".
>
> What do you think?
I could be wrong, but my feeling (in either case) is something like
that would probably require writing a custom archive function.
Luckily, Orgmode allows you to do that.
Cheers,
TRS-80
Am 26.02.21 um 20:30 schrieb TRS-80:
> On 2021-02-25 15:49, Florian Lindner wrote:
>> Am 25.02.21 um 21:22 schrieb Florian Lindner:
>>> is this possible with org-mode? Given a tree:
>>>
>>> * Name
>>> :PROPERTIES:
>>> :ARCHIVE: ???
>>> :END:
>>> ** Archive :ARCHIVE:
>>> ** Some node
>>>
>>> Upon archiving "Some node" (or any direct or indirect sub-node of
>>> Projectname) I want to end it up under "** Archive". The archive
>>> location should always be relative to the node where the property
>>> ARCHIVE is set.
>>>
>>> The documentation org-archive-location does not suggest that is
>>> possible.
>>
>> An alternative idea would be a setting for the ARCHIVE property that
>> searches the tree upward until it finds a node with an :ARCHIVE: tag
>> and use that as archive location. Maybe indicated by a setting of
>> "::%a".
>>
>> What do you think?
>
> I could be wrong, but my feeling (in either case) is something like
> that would probably require writing a custom archive function.
> Luckily, Orgmode allows you to do that.
Ok, I expected that's the way to go. Unfortunately, I wasn't able to
find how to set a custom archive function. Could you give me a pointer?
Florian Lindner <mailinglists@xgm.de> writes:
> Ok, I expected that's the way to go. Unfortunately, I wasn't able to
> find how to set a custom archive function. Could you give me a pointer?
You will need to advice org-archive--compute-location