From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Refiling list items Date: Wed, 17 Aug 2011 11:32:19 +0200 Message-ID: <87ty9gfknw.fsf@gnu.org> References: <8762m8ns2e.fsf@gmail.com> <87d3gfmrpy.fsf@gmail.com> <13875.1312849225@alphaville.americas.hpqcorp.net> <87aabhlgy8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtcTO-0003lB-1T for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 05:31:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtcTM-000611-Sj for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 05:31:42 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:53122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtcTM-00060u-J0 for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 05:31:40 -0400 Received: by wwf10 with SMTP id 10so618805wwf.30 for ; Wed, 17 Aug 2011 02:31:39 -0700 (PDT) In-Reply-To: <87aabhlgy8.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 10 Aug 2011 12:05:35 +0200") 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: Nicolas Goaziou Cc: Jeff Horn , Org-mode ml , nicholas.dokos@hp.com Hi Jeff, thanks for bringing up this issue, and thanks all for the input. I pushed three small changes to the org-refile interface: 1. before prompting the user for a refile target, put the point at the beginning of the region/subtree to refile. This will make sure everyone understands we are refiling headlines, not text. 2. Improve the prompt itself, explicitely saying whether we are refiling a subtree or a region (containing subtree(s)). 3. Add a new option `org-refile-active-region-within-subtree' which, when turned on, allows the user to refile the active region, turning the first line into a headline using `org-toggle-heading'. I think these are improvements going in the right direction -- let me know what you think. On the overall, I'm with Nicolas in thinking that we need to be extra careful when we try to extend a functionality to heterogeneous elements. Nicolas Goaziou writes: > My point is that outside of its list, an item is just plain text. Yes! « Outside of the hive, a bee is just a fly. » (René Descartes) :) > 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. This is what I tried to achieve with the new option. > 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. Thanks for this idea! Best, -- Bastien