emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] possible misfeature regarding multiple #+ARCHIVE lines in a fi


From: Brian van den Broek
Subject: [Orgmode] possible misfeature regarding multiple #+ARCHIVE lines in a file
Date: Sat, 01 Sep 2007 17:51:34 -0400
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

Hi all,

I'm still getting the hang of org-mode, so the problem might be me :-)

That said, there seems to be a misfeature in the way org-mode archives subtrees when using multiple #+ARCHIVE lines in one file.

Consider an org file _testofarchive.org that looks like:


#+ARCHIVE: ./_testofarchiveARCHIVE.org::* First
* First 2007

#+ARCHIVE: ./_testofarchiveARCHIVE.org::* Second
* Second 2007

#+ARCHIVE: ./_testofarchiveARCHIVE.org::* Third
* Third 2007


With point on the * Second 2007 headline, invoke C-c C-x C-s. After the archiving, the file looks like


#+ARCHIVE: ./_testofarchiveARCHIVE.org::* First
* First 2007

#+ARCHIVE: ./_testofarchiveARCHIVE.org::* Second
* Third 2007


The problem is that the #+ARCHIVE line governing the * Second 2007 headline is left behind, and the one governing the * Third 2007 headline is taken away, not as desired. (What I would like to have happen is that the * Second 2007 tree gets filed away, and the following #+ARCHIVE line remains to affect future archiving of * Third 2007.)

As I understand org-mode, this is a consequence of taking a subtree of level n to continue until a headline of level m, m <= n occurs or EOF. But, unless I am missing something, I don't see how the multiple #+ARCHIVE lines technique can be made to work with this definition, short of including dummy level 1 headlines in the file to `protect' the #+ARCHIVE lines. (I mean something like inserting

* To make org happy
#+ARCHIVE: ./_testofarchiveARCHIVE.org::* Third

between * Second 2007 and * Third 2007.)

Am I missing something about how these #+ARCHIVE lines are intended to be used?

It seems to me that a possible fix would be to look at the end of any subtree that is being archived, and leave behind an #+ARCHIVE line (or perhaps uninterrupted block of #+ lines) that terminates the tree being archived.

And, in case it seems like I am trying to do something daft, I'd like to explain my aim briefly. I have a file teaching.org. Each course for the coming term is a top-level headline with course name and term details (e.g., * Intro to Phil 20072008). As I teach some of the same courses in successive terms and academic years, I'd like my teachingARCHIVE.org file to have top level headings for each course title I teach and to send the archived subtrees of particular offerings of a given course title to the appropriate heading in my teachingARCHIVE.org. So, at the end of the year * Intro to Phil 20072008 would become a second level heading under * Intro to Phil, and likewise for * Intro to Phil 20082009 should I teach that next year.

This isn't crucial (I can live without the archiving mechanism sorting the course subtrees for me). But, I can't see how to use the #+ARCHIVE lines as currently implemented.

Thanks and best,

Brian vdB




reply via email to

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