From: Brian van den Broek <broek@cc.umanitoba.ca>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: possible misfeature regarding multiple #+ARCHIVE lines in a file
Date: Sat, 01 Sep 2007 17:51:34 -0400 [thread overview]
Message-ID: <46D9DEE6.6060503@cc.umanitoba.ca> (raw)
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
next reply other threads:[~2007-09-01 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-01 21:51 Brian van den Broek [this message]
2007-09-01 22:05 ` possible misfeature regarding multiple #+ARCHIVE lines in a file 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
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46D9DEE6.6060503@cc.umanitoba.ca \
--to=broek@cc.umanitoba.ca \
--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 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).