all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Set archive location relative to property
@ 2021-02-25 20:22 Florian Lindner
  2021-02-25 20:49 ` Florian Lindner
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Lindner @ 2021-02-25 20:22 UTC (permalink / raw)
  To: emacs-orgmode

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


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

* Re: Set archive location relative to property
  2021-02-25 20:22 Set archive location relative to property Florian Lindner
@ 2021-02-25 20:49 ` Florian Lindner
  2021-02-26 19:30   ` TRS-80
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Lindner @ 2021-02-25 20:49 UTC (permalink / raw)
  To: emacs-orgmode

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?


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

* Re: Set archive location relative to property
  2021-02-25 20:49 ` Florian Lindner
@ 2021-02-26 19:30   ` TRS-80
  2021-02-28 11:33     ` Florian Lindner
  0 siblings, 1 reply; 5+ messages in thread
From: TRS-80 @ 2021-02-26 19:30 UTC (permalink / raw)
  To: emacs-orgmode

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


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

* Re: Set archive location relative to property
  2021-02-26 19:30   ` TRS-80
@ 2021-02-28 11:33     ` Florian Lindner
  2021-02-28 11:52       ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Lindner @ 2021-02-28 11:33 UTC (permalink / raw)
  To: emacs-orgmode

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?



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

* Re: Set archive location relative to property
  2021-02-28 11:33     ` Florian Lindner
@ 2021-02-28 11:52       ` Ihor Radchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2021-02-28 11:52 UTC (permalink / raw)
  To: Florian Lindner, emacs-orgmode

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



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

end of thread, other threads:[~2021-02-28 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-25 20:22 Set archive location relative to property Florian Lindner
2021-02-25 20:49 ` Florian Lindner
2021-02-26 19:30   ` TRS-80
2021-02-28 11:33     ` Florian Lindner
2021-02-28 11:52       ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.