From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Moving checkbox item to end of list when checked
Date: Wed, 22 Jan 2014 13:16:28 +0100 [thread overview]
Message-ID: <87lhy89ppf.fsf@gmail.com> (raw)
In-Reply-To: CAG-LmmB5Hmr5WwOQZ8DpLNB6Q4Ny7OsKXmSOSfYcfM3TKGuAFw@mail.gmail.com
Cecil Westerhof <cldwesterhof@gmail.com> 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
next prev parent reply other threads:[~2014-01-22 14:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 11:27 Moving checkbox item to end of list when checked Cecil Westerhof
2014-01-22 12:16 ` Thorsten Jolitz [this message]
2014-01-22 14:58 ` Nicolas Goaziou
2014-01-22 15:23 ` Thorsten Jolitz
2014-01-22 13:36 ` Bastien
2014-01-22 14:06 ` Nicolas Goaziou
2014-01-22 14:12 ` Cecil Westerhof
2014-01-22 14:26 ` Cecil Westerhof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhy89ppf.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).