emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Setting org-archive-location


From: David Neu
Subject: [Orgmode] Re: Setting org-archive-location
Date: Sat, 6 Dec 2008 15:34:34 -0500

Hi Bernt,

Thanks for that suggestion!

Do you know if there is any way to avoid hardcoding the month and year
I used in my example, i.e.

 :ARCHIVE: %s-2008-12-archive.org::* Work

Cheers,
David

On Sat, Dec 6, 2008 at 3:28 PM, Bernt Hansen <address@hidden> wrote:
> "David Neu" <address@hidden> writes:
>
>> Is there any way to get the second part of the org-archive-location
>> variable, i.e. the part after the colon that corresponds to headline,
>> to be the headline under which an subtree lies.  For example, consider
>>
>> * Work
>> ** Finsh DBMS
>> *** TODO Define schema
>> *** TODO Write code
>> ** Implement API
>> *** TODO Develop prototype
>>
>> * Home
>> ** Clean garage
>> *** TODO Buy shelves
>> *** TODO Install shelves
>>
>> For "Finish DBMS", and "Implement API", you might want to have
>>
>> (setq org-archive-location (format-time-string
>> "%%s-%Y-%m-archive.org::* Work" (current-time)))
>>
>> but for "Clean garage", you would then want
>>
>> (setq org-archive-location (format-time-string
>> "%%s-%Y-%m-archive.org::* Home" (current-time)))
>>
>> Is there any way to achieve this behavior?
>
> Set a property under the level 1 headings with the archive location you
> want
>
> ,----
> | * Work
> |   :PROPERTIES:
> |   :ARCHIVE: %s_archive::* Work
> |   :END:
> | ** Finish DBMS
> |    ...
> | * Home
> |   :PROPERTIES:
> |   :ARCHIVE: %s_archive::* Home
> |   :END:
> | ** Clean garage
> |    ...
> `----
>
> -Bernt
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]