From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eddward DeVilla <eddward@gmail.com>
Cc: emacs-orgmode@gnu.org, Richard KLINDA <rklinda@gmail.com>
Subject: Re: Re: checkbox statistics (fixed version)
Date: Sat, 9 May 2009 08:56:25 +0200 [thread overview]
Message-ID: <B4B18BDE-6284-4F9B-BA63-457A34ED1493@gmail.com> (raw)
In-Reply-To: <b71b18520905081650n18fabd9do902a1a10e7dc5985@mail.gmail.com>
On May 9, 2009, at 1:50 AM, Eddward DeVilla wrote:
> That's true, but to be honest, before I knew about the [-] feature, I
> used [/] tokens on list items with checkboxes under them. I'd
> consider this an improvement.
Consider what exactly an improvement?
- Carsten
>
> Edd
>
> On Fri, May 8, 2009 at 10:27 AM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>> Hi Richard,
>>
>> your patch works, almost.
>>
>> Where it goes wrong is here:
>>
>> * test [3/6]
>> - one
>> - [X] two
>> - three
>> - [-] four
>> - [X] five
>> - [-] six
>> - seven
>> - [ ] eight
>> - [X] nine
>>
>>
>> The statistics cookie talks about 6 checkboxes below it,
>> but in fact there are only 4, two (at "four" and "six")
>> are a "summary" checkboxes.
>> So we get the funny effect that toggling "eight" will make
>> the cookie jump from 3/6 directly to 6/6 ....
>>
>> Maybe this is acceptable, because the "summary" checkboxes don't
>> really
>> make sense when the statistics covers the entire tree....
>>
>> Opinions?
>>
>> - Carsten
>>
>> On Apr 24, 2009, at 3:01 PM, Richard KLINDA wrote:
>>
>>> This is the fixed patch, it actually works on my real life org
>>> files so
>>> this has a slight chance of being right.
>>>
>>>> ------------------------------------------------------------------------
>>>
>>> diff --git a/lisp/org-list.el b/lisp/org-list.el
>>> index 7469add..872dddf 100644
>>> --- a/lisp/org-list.el
>>> +++ b/lisp/org-list.el
>>> @@ -110,6 +110,9 @@ with \\[org-ctrl-c-ctrl-c\\]."
>>> :group 'org-plain-lists
>>> :type 'boolean)
>>>
>>> +(defcustom org-recursive-checkbox-statistics nil
>>> + "Non-nil means, that checkbox counting should happen
>>> recursively.")
>>> +
>>> (defcustom org-description-max-indent 20
>>> "Maximum indentation for the second line of a description list.
>>> When the indentation would be larger than this, it will become
>>> @@ -402,7 +405,10 @@ the whole buffer."
>>> (org-beginning-of-item)
>>> (setq curr-ind (org-get-indentation))
>>> (setq next-ind curr-ind)
>>> - (while (and (bolp) (org-at-item-p) (= curr-ind next-
>>> ind))
>>> + (while (and (bolp) (org-at-item-p)
>>> + (if org-recursive-checkbox-statistics
>>> + (<= curr-ind next-ind)
>>> + (= curr-ind next-ind)))
>>> (save-excursion (end-of-line) (setq eline (point)))
>>> (if (re-search-forward re-box eline t)
>>> (if (member (match-string 2) '("[ ]" "[-]"))
>>> @@ -410,7 +416,12 @@ the whole buffer."
>>> (setq c-on (1+ c-on))
>>> )
>>> )
>>> - (org-end-of-item)
>>> + (if org-recursive-checkbox-statistics
>>> + (progn
>>> + (end-of-line)
>>> + (when (re-search-forward org-list-
>>> beginning-re
>>> lim t)
>>> + (beginning-of-line)))
>>> + (org-end-of-item))
>>> (setq next-ind (org-get-indentation))
>>> )))
>>> (goto-char continue-from)
>>>
>>>> ------------------------------------------------------------------------
>>>
>>> --
>>> Richard
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
next prev parent reply other threads:[~2009-05-09 6:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 10:47 checkbox statistics Richard KLINDA
2009-04-21 12:26 ` Carsten Dominik
2009-04-24 12:44 ` Richard KLINDA
2009-04-24 12:56 ` Richard KLINDA
2009-04-24 17:37 ` Samuel Wales
2009-04-25 8:21 ` Richard KLINDA
2009-04-24 13:01 ` checkbox statistics (fixed version) Richard KLINDA
2009-04-24 19:48 ` Eddward DeVilla
2009-05-08 15:27 ` Carsten Dominik
2009-05-08 23:50 ` Eddward DeVilla
2009-05-09 6:56 ` Carsten Dominik [this message]
2009-05-09 20:47 ` Eddward DeVilla
2009-05-10 7:17 ` Carsten Dominik
2009-04-26 18:05 ` checkbox statistics Marc Spitzer
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=B4B18BDE-6284-4F9B-BA63-457A34ED1493@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=eddward@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rklinda@gmail.com \
/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).