From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian van den Broek Subject: possible misfeature regarding multiple #+ARCHIVE lines in a file Date: Sat, 01 Sep 2007 17:51:34 -0400 Message-ID: <46D9DEE6.6060503@cc.umanitoba.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IRasY-00032d-Pr for emacs-orgmode@gnu.org; Sat, 01 Sep 2007 17:51:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IRasW-00032C-9k for emacs-orgmode@gnu.org; Sat, 01 Sep 2007 17:51:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRasW-000322-5G for emacs-orgmode@gnu.org; Sat, 01 Sep 2007 17:51:40 -0400 Received: from electra.cc.umanitoba.ca ([130.179.16.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IRasV-0003Km-Ns for emacs-orgmode@gnu.org; Sat, 01 Sep 2007 17:51:39 -0400 Received: from [192.168.1.113] (bas5-montreal02-1167961292.dsl.bell.ca [69.157.172.204]) (authenticated bits=0) by electra.cc.umanitoba.ca (8.13.0/8.13.0) with ESMTP id l81Lpbxv017178 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 1 Sep 2007 16:51:38 -0500 (CDT) 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: 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