From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Move to item to the bottom Date: Sat, 02 Jul 2011 21:25:44 +0200 Message-ID: <87wrg08oxz.fsf@gmail.com> References: <878vsjb14b.fsf@gmail.com> <87zkkya4ok.fsf@gmail.com> <87hb765qfz.fsf@gnu.org> <87mxgy9xjq.fsf@gmail.com> <87vcvmxs5h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd5pC-0003wp-1R for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 15:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qd5pA-0007bI-MS for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 15:25:54 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:50394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qd5pA-0007b0-GZ for emacs-orgmode@gnu.org; Sat, 02 Jul 2011 15:25:52 -0400 Received: by wwi14 with SMTP id 14so663894wwi.0 for ; Sat, 02 Jul 2011 12:25:50 -0700 (PDT) In-Reply-To: <87vcvmxs5h.fsf@gnu.org> (Bastien's message of "Fri, 01 Jul 2011 11:32:42 +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: Bastien Cc: Org Mode , Marcelo de Moraes Serpa Hello, Bastien writes: > Nicolas Goaziou writes: > >> It needs a better optimization (my excuse for >> `org-list-delete-item'). I will work on it tonight. > > Thanks! I've pushed a draft to: git://github.com/ngz/org-mode-lists.git move-cycle The branch is made of two patches. The first one implements the all-mighty (but not-so useful) `org-list-send-item' function. Here is its doc-string: Send ITEM to destination DEST. STRUCT is the list structure. DEST can have various values. If DEST is a buffer position, the function will assume it points to another item in the same list as ITEM, and will move the latter just before the former. If DEST is `begin' (resp. `end'), ITEM will be moved at the beginning (resp. end) of the list it belongs to. If DEST is a string like "N", where N is an integer, ITEM will be moved at the Nth position in the list. If DEST is `kill-ring', ITEM will be deleted and its body will be added to the kill-ring. If DEST is nil, ITEM will be deleted. This function returns, destructively, the new list structure. The second one changes the behavior of `org-move-item-up' (and not `org-move-item-down, for comparison). When the user tries to move the first item of a list up, the function will ask him whether he wants to roll it back to the end of the list, or not. I'm not particularly convinced by that feature, but I implemented it nonetheless for 2 reasons: 1. it doesn't add yet another key-binding; 2. it doesn't prevent macros to stop at the beginning of the list (when using C-u 0 ). So, what do you all think about it? Regards, -- Nicolas Goaziou