all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Lundin <mdl@imapmail.org>
To: David Neu <david@davidneu.com>
Cc: Bernt Hansen <bernt@norang.ca>, emacs-orgmode@gnu.org
Subject: Re: Re: Setting org-archive-location
Date: Sun, 07 Dec 2008 08:28:19 -0600	[thread overview]
Message-ID: <m2d4g45abg.fsf@fastmail.fm> (raw)
In-Reply-To: <e0b44a890812061234t6fbcb662v662e8cb629701bf5@mail.gmail.com> (David Neu's message of "Sat\, 6 Dec 2008 15\:34\:34 -0500")


Hi David,

"David Neu" <david@davidneu.com> 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

      parent reply	other threads:[~2008-12-07 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06 20:05 Setting org-archive-location David Neu
2008-12-06 20:28 ` Bernt Hansen
2008-12-06 20:34   ` David Neu
2008-12-07  4:02     ` Bernt Hansen
2008-12-07 14:28     ` Matthew Lundin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2d4g45abg.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=bernt@norang.ca \
    --cc=david@davidneu.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.