emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Move to item to the bottom


From: Nicolas Goaziou
Subject: Re: [O] Move to item to the bottom
Date: Sat, 02 Jul 2011 21:25:44 +0200

Hello,

Bastien <address@hidden> writes:

> Nicolas Goaziou <address@hidden> 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 <F4>).

So, what do you all think about it?


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]