From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Moving checkbox item to end of list when checked Date: Wed, 22 Jan 2014 13:16:28 +0100 Message-ID: <87lhy89ppf.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5zBL-00063A-Ah for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:53:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5zBC-00008b-Bx for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:53:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:38773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5zBB-00007q-S4 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:53:21 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W5wix-0007Lq-Em for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 13:16:03 +0100 Received: from g231232076.adsl.alicedsl.de ([92.231.232.76]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 13:16:03 +0100 Received: from tjolitz by g231232076.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 13:16:03 +0100 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: emacs-orgmode@gnu.org Cecil Westerhof writes: > I have the folowing: > * Actions - [X] A - [ ] B - [ ] C > > When on A I give ‘C-c C-c’ I get: > * Actions >   - [X] A >   - [ ] B >   - [ ] C > > but I would like to get: > * Actions >   - [ ] B >   - [ ] C >   - [X] A > > Is this possible? > If not I could write an alias for it I think. Is there a command for > going to the end of the list? Your function could be implemented along the line of: 1. put an 'after' advice on `org-toggle-checkbox' 2. use function `org-list-send-item' with DEST 'end to send 'ITEM at point' to the end of 'STRUCT at point' in this advice #+begin_src emacs-lisp (defun org-list-send-item (item dest struct) "Send ITEM to destination DEST. ...) #+end_src Its easy to get 'struct at point' with #+begin_src emacs-lisp (defun org-list-struct () "Return structure of list at point. ...) #+end_src but I could not find an equivalent function to get the item at point. -- cheers, Thorsten