emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Karl Voit <news2042@Karl-Voit.at>
Cc: emacs-orgmode@gnu.org
Subject: Re: Suggested Syntax for cancelled checkboxes: [-] as non-blocking dependency
Date: Tue, 13 Sep 2022 10:24:31 +0800	[thread overview]
Message-ID: <87sfkwt3j4.fsf@localhost> (raw)
In-Reply-To: <2022-09-12T14-35-24@devnull.Karl-Voit.at>

Karl Voit <devnull@Karl-Voit.at> writes:

> I was using list checkboxes like that:
>
> - [ ] open task
> - [X] closed task
> - [-] cancelled task
>
> The latter one is supported via C-u C-u C-c C-c.

From the manual (5.6 Checkboxes):

‘C-c C-x C-b’ (‘org-toggle-checkbox’)
     Toggle checkbox status or—with prefix argument—checkbox presence at
     point.  With double prefix argument, set it to ‘[-]’, which is
     considered to be an intermediate state.

[-] is not considered done by our conventions

   Here is an example of a checkbox list.

     * TODO Organize party [2/4]
       - [-] call people [1/3]
         - [ ] Peter
         - [X] Sarah
         - [ ] Sam
       - [X] order food
       - [ ] think about what music to play
       - [X] talk to the neighbors

> However, when I'm using:
>
> (setq org-enforce-todo-checkbox-dependencies t)
>
> ... any [-] checkbox will be regarded as non-finished contrary to
> the behavior of TODO/DONE/CANCELLED heading states.
>
> As a workaround, I may use:
>
> - +[ ]+ cancelled task
>
> ... but this is tedious.
>
> Therefore I'm asking if this might be a viable syntax change:
> handling [-] list items similar to CANCELLED headings as
> non-blocking when used with org-enforce-todo-checkbox-dependencies.

As you can see, we already have conflicting convention, and we cannot
change it without breaking backwards compatibility.

`org-block-todo-from-checkboxes', currently uses

(org-list-search-forward
		 (concat (org-item-beginning-re)
			 "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
			 "\\[[- ]\\]")
		 end t)

as a condition that some list items are marked incomplete.

So, you can use something like
 - [C] cancelled task

But beware that this is an internal implementation detail that might be
changed in future unless we decide to document the existing behaviour.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


  reply	other threads:[~2022-09-13  2:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 12:40 Suggested Syntax for cancelled checkboxes: [-] as non-blocking dependency Karl Voit
2022-09-13  2:24 ` Ihor Radchenko [this message]
2022-09-13  8:07   ` Karl Voit
2022-09-13 10:44     ` Marcin Borkowski
2022-09-13 11:07     ` Christophe Schockaert
2022-09-13 15:52       ` Karl Voit
2022-09-14 12:43         ` Ihor Radchenko
2022-09-15 11:48           ` Christophe Schockaert
2022-09-16  4:59             ` Ihor Radchenko
2022-09-19 11:10             ` Karl Voit
2022-09-14 18:18     ` Daniel Fleischer
2022-09-22 15:03       ` Bastien
2022-09-22 17:19         ` Milan Zamazal
2022-09-22 23:19         ` Tim Cross
2022-09-23  2:46           ` Ihor Radchenko
2022-09-25  2:59             ` Bastien
2022-09-24  8:09           ` Milan Zamazal

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=87sfkwt3j4.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=news2042@Karl-Voit.at \
    /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).