emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* possible misfeature regarding multiple #+ARCHIVE lines in a file
@ 2007-09-01 21:51 Brian van den Broek
  2007-09-01 22:05 ` Brian van den Broek
  0 siblings, 1 reply; 7+ messages in thread
From: Brian van den Broek @ 2007-09-01 21:51 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-03 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-01 21:51 possible misfeature regarding multiple #+ARCHIVE lines in a file Brian van den Broek
2007-09-01 22:05 ` Brian van den Broek
2007-09-03  7:30   ` Carsten Dominik
2007-09-03 17:43     ` Brian van den Broek
2007-09-03 18:25       ` Carsten Dominik
2007-09-03 19:31         ` Brian van den Broek
2007-09-03 20:43           ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).