* Cookies on check-boxed plain lists don't get updated
@ 2015-08-10 12:50 Gerald Wildgruber
2015-08-10 13:43 ` Rasmus
0 siblings, 1 reply; 8+ messages in thread
From: Gerald Wildgruber @ 2015-08-10 12:50 UTC (permalink / raw)
To: emacs-orgmode
Hi
I'm running org mode on emacs version GNU Emacs 25.0.50.1 (git checkout).
I'm using nested plain lists with check-boxes and cookies; here's a
simple example:
=====================================
* TODO Heading [0/3]
- [ ] entry 1
- [ ] entry 2 [0/0]
- [ ] sub-entry 1
- [ ] sub-entry 2
- [ ] sub-entry 3
- [ ] entry 3
=====================================
Regardless of any edits of sub-entries, the cookie of "entry 2" NEVER
gets updated, it always shows a green "[0/0]" and not the correct
"[0/3]"; it doesn't work neither with org mode 8.3 stable nor with a git
checkout.
If I delete "entry 1", updating the cookie works; so: it only works if
nothing stands before the entry wich has the cookie (that also means:
the nesting itself in NOT the problem).
It DOES work correctly with the org mode package that comes with emacs:
"Org-mode version 8.2.10 (release_8.2.10 @ /usr/local/share/emacs/25.0.50/lisp/org/)"
Thanks for your help
Gerald
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-10 12:50 Cookies on check-boxed plain lists don't get updated Gerald Wildgruber
@ 2015-08-10 13:43 ` Rasmus
2015-08-10 15:32 ` Gerald Wildgruber
0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2015-08-10 13:43 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I can reproduce.
Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
> =====================================
>
> * TODO Heading [0/3]
>
> - [ ] entry 1
> - [ ] entry 2 [0/0]
> - [ ] sub-entry 1
> - [ ] sub-entry 2
> - [ ] sub-entry 3
> - [ ] entry 3
>
> =====================================
I don't have time to attempt to fix it now, but it's introduced in
a4cc9d82d8069741be64c55f35f9d3ad7e2663d5 if my git bisect foo is correct.
My guess would be that container goes too far back:
+ (container
+ (org-element-lineage
+ context
+ '(drawer center-block dynamic-block inlinetask plain-list
+ quote-block special-block verse-block))
plain-list also includes entry 1, but it should only consider the sublist
starting with entry 2.
Rasmus
--
One thing that is clear: it's all down hill from here
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-10 13:43 ` Rasmus
@ 2015-08-10 15:32 ` Gerald Wildgruber
2015-08-10 21:29 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Gerald Wildgruber @ 2015-08-10 15:32 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Hi Rasmus,
thanks for your hint, indeed this particular commit changed the
check-box related algorithm; "git log" gives:
commit a4cc9d82d8069741be64c55f35f9d3ad7e2663d5
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue Jun 9 17:06:17 2015 +0200
org-list: Fix checkbox update with inlinetasks
* lisp/org-list.el (org-update-checkbox-count): Change algorithm. Use
Element parser.
* testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
New test.
I then looked at this particular file's git log:
git log lisp/org-list.el
and checked out Nicolas' last revision BEFORE his commit on Tue Jun 9:
git checkout a0c1e490b30cc4c0dd9e9ecdd70c32a52b08a57e lisp/org-list.el
And indeed: everything works again as expected.
Nicolas, can you see what caused this regression and can it be fixed?
Thanks
Gerald.
On Mo, Aug 10 2015, Rasmus <rasmus@gmx.us> wrote:
> Hi,
>
> I can reproduce.
>
> Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
>
>> =====================================
>>
>> * TODO Heading [0/3]
>>
>> - [ ] entry 1
>> - [ ] entry 2 [0/0]
>> - [ ] sub-entry 1
>> - [ ] sub-entry 2
>> - [ ] sub-entry 3
>> - [ ] entry 3
>>
>> =====================================
>
> I don't have time to attempt to fix it now, but it's introduced in
> a4cc9d82d8069741be64c55f35f9d3ad7e2663d5 if my git bisect foo is correct.
>
> My guess would be that container goes too far back:
>
> + (container
> + (org-element-lineage
> + context
> + '(drawer center-block dynamic-block inlinetask plain-list
> + quote-block special-block verse-block))
>
> plain-list also includes entry 1, but it should only consider the sublist
> starting with entry 2.
>
> Rasmus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-10 15:32 ` Gerald Wildgruber
@ 2015-08-10 21:29 ` Nicolas Goaziou
2015-08-11 7:40 ` Gerald Wildgruber
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2015-08-10 21:29 UTC (permalink / raw)
To: Gerald Wildgruber; +Cc: emacs-orgmode, Rasmus
Hello,
Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
> Hi Rasmus,
>
> thanks for your hint, indeed this particular commit changed the
> check-box related algorithm; "git log" gives:
>
> commit a4cc9d82d8069741be64c55f35f9d3ad7e2663d5
> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> Date: Tue Jun 9 17:06:17 2015 +0200
>
> org-list: Fix checkbox update with inlinetasks
>
> * lisp/org-list.el (org-update-checkbox-count): Change algorithm. Use
> Element parser.
>
> * testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
> New test.
>
>
> I then looked at this particular file's git log:
>
> git log lisp/org-list.el
>
> and checked out Nicolas' last revision BEFORE his commit on Tue Jun 9:
>
> git checkout a0c1e490b30cc4c0dd9e9ecdd70c32a52b08a57e lisp/org-list.el
>
> And indeed: everything works again as expected.
>
> Nicolas, can you see what caused this regression and can it be fixed?
Fixed. Thanks to Rasmus and you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-10 21:29 ` Nicolas Goaziou
@ 2015-08-11 7:40 ` Gerald Wildgruber
2015-08-11 8:57 ` Rasmus
0 siblings, 1 reply; 8+ messages in thread
From: Gerald Wildgruber @ 2015-08-11 7:40 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode, Rasmus
Hi Nicolas,
thanks for the fix! The sub list cookie does get updated now, perfect!
Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):
* 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
With the new code now this gives:
* TODO Organize party [3/7]
- [-] call people [1/3]
- [ ] Peter
- [X] Sarah
- [ ] Sam
- [X] order food
- [ ] think about what music to play
- [X] talk to the neighbors
Per default, the count now happens through ALL levels irrespective of
hierarchy ("organize party now has SEVEN sub tasks, not FOUR).
So the default behavior with regard to
"org-checkbox-hierarchical-statistics" has changed.
Manual: "Each cookie covers checkboxes of direct children structurally
below the headline/item on which the cookie appears. Set the option
org-checkbox-hierarchical-statistics if you want such cookies to count
all checkboxes below the cookie, not just those belonging to direct
children."
Perhaps it should be reflected in the Manual also.
Thanks again for your quick help!
Gerald.
On Mo, Aug 10 2015, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
>
>> Hi Rasmus,
>>
>> thanks for your hint, indeed this particular commit changed the
>> check-box related algorithm; "git log" gives:
>>
>> commit a4cc9d82d8069741be64c55f35f9d3ad7e2663d5
>> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
>> Date: Tue Jun 9 17:06:17 2015 +0200
>>
>> org-list: Fix checkbox update with inlinetasks
>>
>> * lisp/org-list.el (org-update-checkbox-count): Change algorithm. Use
>> Element parser.
>>
>> * testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
>> New test.
>>
>>
>> I then looked at this particular file's git log:
>>
>> git log lisp/org-list.el
>>
>> and checked out Nicolas' last revision BEFORE his commit on Tue Jun 9:
>>
>> git checkout a0c1e490b30cc4c0dd9e9ecdd70c32a52b08a57e lisp/org-list.el
>>
>> And indeed: everything works again as expected.
>>
>> Nicolas, can you see what caused this regression and can it be fixed?
>
> Fixed. Thanks to Rasmus and you.
>
> Regards,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-11 7:40 ` Gerald Wildgruber
@ 2015-08-11 8:57 ` Rasmus
2015-08-11 9:40 ` Gerald Wildgruber
2015-08-11 12:15 ` Nicolas Goaziou
0 siblings, 2 replies; 8+ messages in thread
From: Rasmus @ 2015-08-11 8:57 UTC (permalink / raw)
To: emacs-orgmode
Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
> Hi Nicolas,
>
> thanks for the fix! The sub list cookie does get updated now, perfect!
>
>
> Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):
>
> * 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
>
> With the new code now this gives:
>
> * TODO Organize party [3/7]
> - [-] call people [1/3]
> - [ ] Peter
> - [X] Sarah
> - [ ] Sam
> - [X] order food
> - [ ] think about what music to play
> - [X] talk to the neighbors
From a clean Emacs, I get the first desired behavior.
I also got a couple of errors:
org-update-checkbox-count: Invalid search bound (wrong side of point)
but I cannot seem to reproduce this consistently. One time I had two
"[/]" boxes.
Rasmus
--
When the facts change, I change my mind. What do you do, sir?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-11 8:57 ` Rasmus
@ 2015-08-11 9:40 ` Gerald Wildgruber
2015-08-11 12:15 ` Nicolas Goaziou
1 sibling, 0 replies; 8+ messages in thread
From: Gerald Wildgruber @ 2015-08-11 9:40 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
On Di, Aug 11 2015, Rasmus <rasmus@gmx.us> wrote:
> Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> writes:
>> Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):
>>
>> * 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
>>
>> With the new code now this gives:
>>
>> * TODO Organize party [3/7]
>> - [-] call people [1/3]
>> - [ ] Peter
>> - [X] Sarah
>> - [ ] Sam
>> - [X] order food
>> - [ ] think about what music to play
>> - [X] talk to the neighbors
>
> From a clean Emacs, I get the first desired behavior.
>
> I also got a couple of errors:
>
> org-update-checkbox-count: Invalid search bound (wrong side of point)
>
> but I cannot seem to reproduce this consistently. One time I had two
> "[/]" boxes.
>
> Rasmus
You are right: the default setting of this variable is "t", meaning to
count only direct children; I just checked on a clean emacs install
under linux.
I have to verify again what is different on my OSX machine where I tried
it out earlier.
I don't get the errors on either machine though.
Gerald.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cookies on check-boxed plain lists don't get updated
2015-08-11 8:57 ` Rasmus
2015-08-11 9:40 ` Gerald Wildgruber
@ 2015-08-11 12:15 ` Nicolas Goaziou
1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2015-08-11 12:15 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> I also got a couple of errors:
>
> org-update-checkbox-count: Invalid search bound (wrong side of point)
>
> but I cannot seem to reproduce this consistently. One time I had two
> "[/]" boxes.
This should be fixed in 9bb87f49f72de1ff7fcddc063f961d898b9f3c81. Thank
you.
Regards,
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-08-11 12:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 12:50 Cookies on check-boxed plain lists don't get updated Gerald Wildgruber
2015-08-10 13:43 ` Rasmus
2015-08-10 15:32 ` Gerald Wildgruber
2015-08-10 21:29 ` Nicolas Goaziou
2015-08-11 7:40 ` Gerald Wildgruber
2015-08-11 8:57 ` Rasmus
2015-08-11 9:40 ` Gerald Wildgruber
2015-08-11 12:15 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.