emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: Setting org-archive-location


From: Matthew Lundin
Subject: Re: [Orgmode] Re: Setting org-archive-location
Date: Sun, 07 Dec 2008 08:28:19 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin)

Hi David,

"David Neu" <address@hidden> writes:

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

One alternative to setting a lot of ARCHIVE properties in your file
would be to rely on sparse tree filtering and property searches in the
archive file to see items that used belonging to particular headlines
in the original file. If you set org-archive-save-context-info to
include olpath, the outline headings will be saved as a property of
the archived subheadling, enabling you to filter by original location
in the tree. 

>>> * Work
>>> ** Finsh DBMS
>>> *** TODO Define schema
>>> *** TODO Write code
>>> ** Implement API
>>> *** TODO Develop prototype
>>>
>>> * Home
>>> ** Clean garage
>>> *** TODO Buy shelves
>>> *** TODO Install shelves

For example if you archived "Clean Garage," it would appear in your
archive file as:

* Clean Garage
  :PROPERTIES:
  :ARCHIVE_OLPATH: Home
  [...]
  :END:

Thus, in your example, you could filter by "Work" or by "Home" in the
archive file. You can also optionally save information about CATEGORY,
tags, file, etc. This would enable you to retain your dynamic archive
file names using setq-org-archive-location, while still having the
power to filter by type of work. Here's what I use:

(setq org-archive-location (concat "~/archive/" (format-time-string \
"%Y") ".org::* " (format-time-string "%B")))

Which currently produces:

~/archive/2008.org::* December

Using sparse trees, I can get a quick chronological overview of the
entire year, filtered for particular types of work.

This may not be what you are looking for, but I thought I'd share this
possibility in case it helps.

Just one more example of the astounding power and functionality of
org!

Best,
Matt




reply via email to

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