From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Re: Setting org-archive-location Date: Sun, 07 Dec 2008 08:28:19 -0600 Message-ID: References: <87prk5rqtz.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9KcX-0002Y6-5i for emacs-orgmode@gnu.org; Sun, 07 Dec 2008 09:28:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9KcV-0002Wk-3q for emacs-orgmode@gnu.org; Sun, 07 Dec 2008 09:28:27 -0500 Received: from [199.232.76.173] (port=58313 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9KcT-0002WE-Up for emacs-orgmode@gnu.org; Sun, 07 Dec 2008 09:28:26 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:51285) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L9KcT-0000jr-II for emacs-orgmode@gnu.org; Sun, 07 Dec 2008 09:28:25 -0500 In-Reply-To: (David Neu's message of "Sat\, 6 Dec 2008 15\:34\:34 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Neu Cc: Bernt Hansen , emacs-orgmode@gnu.org Hi David, "David Neu" 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