From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: possible misfeature regarding multiple #+ARCHIVE lines in a file Date: Mon, 3 Sep 2007 09:30:54 +0200 Message-ID: References: <46D9DEE6.6060503@cc.umanitoba.ca> <46D9E22B.10207@cc.umanitoba.ca> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IS6Og-0002HM-0X for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 03:30:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IS6Of-0002H3-5O for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 03:30:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IS6Of-0002H0-04 for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 03:30:57 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IS6Oe-00052j-Ll for emacs-orgmode@gnu.org; Mon, 03 Sep 2007 03:30:56 -0400 In-Reply-To: <46D9E22B.10207@cc.umanitoba.ca> 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: Brian van den Broek Cc: emacs-orgmode On Sep 2, 2007, at 0:05, Brian van den Broek wrote: > Brian van den Broek said unto the world upon 09/01/2007 05:51 PM: > In a thread from 2007-03 started by > msg00084.html> > a similar problem was discussed regarding #+CATEGORY lines. Carsten > msg00089.html> said that what I called `dummy' headlines was one of > two possible work-arounds he could see. What didn't come up was the > suggestion I made: > >> 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. > > Now I am curious as to if this is unworkable. Carsten, if it is, would > you mind briefly sketching why? (Time permitting, of course.) Hi Brian, In principle the solution you propose is workable of course. You are, in fact, not the first to think of this: for example the file outline.el in Emacs 22 states: ;;; Todo: ;; - subtree-terminators ;; - better handle comments before function bodies (i.e. heading) ;; - don't bother hiding whitespace This is an issue in many types of files that would like to use outline to get a structured view on a file. For example Programmers often write comments *before* a function definition. I find it hard to envision a *clean* implementation, however. Problems with this approach are: - Lets say we say that comments before a headline so not belong to the entry before it. Do they belong to the entry after it? If I archive the entry after it, should I move the comment then? - What if I have a normal entry with some text in there, and I decide to comment it out, just temporarily. All of a sudden this text no longer belongs to the entry, when I move the entry up or down, using structure editing commands, how should I decide in a safe way what comment does and what dow not belong to an entry? The current outline implementation is at least clean in the sense that it is totally predictable what will happen if you issue certain commands. I still believe that the best work-around it to have top-level sections in your file, make the #+ARCHIVE lint the first line *inside* the section, and then have your TODO items as level 2 entries below it. If you are going to structure your document anyway in a way that requires multiple archives, why not reflect this structure also with top-level headlines? - Carsten