From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Refiling list items Date: Wed, 10 Aug 2011 12:05:35 +0200 Message-ID: <87aabhlgy8.fsf@gmail.com> References: <8762m8ns2e.fsf@gmail.com> <87d3gfmrpy.fsf@gmail.com> <13875.1312849225@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr5fo-0006kD-Sy for emacs-orgmode@gnu.org; Wed, 10 Aug 2011 06:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr5fn-0000NQ-Vj for emacs-orgmode@gnu.org; Wed, 10 Aug 2011 06:06:04 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:65110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr5fn-0000NM-PE for emacs-orgmode@gnu.org; Wed, 10 Aug 2011 06:06:03 -0400 Received: by wwf10 with SMTP id 10so773789wwf.30 for ; Wed, 10 Aug 2011 03:06:02 -0700 (PDT) In-Reply-To: (Jeff Horn's message of "Mon, 8 Aug 2011 20:40:40 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jeff Horn Cc: nicholas.dokos@hp.com, Org-mode ml Hello, > I guess this really amounts to the first time I've ever been convinced > that "treating list items like headlines" would be useful to me. At > least, it feels like list items might benefit from being a proper > subset of headlines. I don't remember what the disadvantages of such a > move would be, but I suspect there's a lot of tacit knowledge in the > codebase already. >From my point of view, lists cannot be a subset of headlines. Indeed, headlines are global structural elements, whereas items are local structural elements. In other words, moving an item outside of its scope, which is the list it belongs, will remove any structural meaning it has. For example, what is the point of moving an un-ordered item into an ordered list, or, worse, an un-ordered item into a description list? Sure, the item being moved and the destination list may share the same structure, but it's only a part of the equation. Also, we can imagine the following situation, where a section holds a description list and an un-ordered one. If one wants to move an un-ordered item there, should it be moved into the logical, but mismatched, first description list, or into the un-ordered one? My point is that outside of its list, an item is just plain text. Thus, why not take that into account? Instead of creating a magical function to refile items anywhere, let's just extend `org-refile' to work on a region of text which is not a sub-tree. At the moment, org-refile understands the concept of region, but checks if that region holds a sub-tree. What about removing that check, and adapt the code to text without trees? It will then be the user's problem if he wants to match apples and oranges. Furthermore, as a side effect, refiling an item would simply mean selecting it and using refile interface. Regards, -- Nicolas Goaziou