From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cecil Westerhof Subject: Re: Moving checkbox item to end of list when checked Date: Wed, 22 Jan 2014 15:26:41 +0100 Message-ID: References: <87wqhsi1f5.fsf@bzg.ath.cx> <87fvogw1pj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c0dd96e605b904f08fe91d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ylV-0007vT-05 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:26:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5ylO-0007Vs-JM for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:26:48 -0500 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:49531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ylO-0007Vm-E9 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 09:26:42 -0500 Received: by mail-qc0-f173.google.com with SMTP id i8so529915qcq.18 for ; Wed, 22 Jan 2014 06:26:42 -0800 (PST) In-Reply-To: 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 --001a11c0dd96e605b904f08fe91d Content-Type: text/plain; charset=ISO-8859-1 2014/1/22 Cecil Westerhof > >> but I would like to get: > >> >> * Actions >> >> - [ ] B >> >> - [ ] C >> >> - [X] A >> >> >> >> Is this possible? >> > >> > `C-c ^ x' to sort the list by checkbox status. >> > >> > But this is an additional step after ticking the checkbox. >> > >> >> If not I could write an alias for it I think. Is there a command for >> >> going to the end of the list? >> > >> > Not a command, but an internal function you can explore: >> > `org-list-get-list-end'. >> >> I think that the higher-level function `org-list-send-item' would be >> useful too: >> >> (org-list-send-item (line-beginning-position) 'end (org-list-struct)) >> > > In a simple case this does exactly what I want. I have to check what > happens if it is several layers deep, but it looks certainly very > promising. Thanks. > > It looks that it goes well also when the list is deeper. I need to do the following things: - check that I am on an element of a list - check that it is a checkbox - check that it is not checked I f I see it correctly this can all be done with (org-list-struct). I'll work it out. -- Cecil Westerhof --001a11c0dd96e605b904f08fe91d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2014= /1/22 Cecil Westerhof <cldwesterhof@gmail.com>
>> but I would like to get:
>> * Actions
>> =A0 - [ ] B
>> =A0 - [ ] C
>> =A0 - [X] A
>>
>> Is this possible?
>
> `C-c ^ x' to sort the list by checkbox status.
>
> But this is an additional step after ticking the checkbox.
>
>> If not I could write an alias for it I think. Is there a command f= or
>> going to the end of the list?
>
> Not a command, but an internal function you can explore:
> `org-list-get-list-end'.

I think that the higher-level function `org-list-send-item'= would be
useful too:

=A0 (org-list-send-item (line-beginning-position) 'end (org-list-struct= ))

In a simple case this does exactly what I want. I ha= ve to check what happens if it is several layers deep, but it looks certain= ly very promising. Thanks.


It looks that it goes well= also when the list is deeper.

I need to do the following things:
- check that I am on an element of a list
- check tha= t it is a checkbox
- check that it is not checked

I
f I see it correc= tly this can all be done with (org-list-struct). I'll work it out.

--
Cecil Westerhof
--001a11c0dd96e605b904f08fe91d--