* Statistic cookies for headings and list items
@ 2020-03-31 19:31 Michael Brand
2020-06-01 13:29 ` Bastien
0 siblings, 1 reply; 5+ messages in thread
From: Michael Brand @ 2020-03-31 19:31 UTC (permalink / raw)
To: Org Mode
Is this all intended behaviour?
When I start with ~C-c C-c~ on [ of line A, Org seems to count list items:
* [0/2] A
- [ ] B
- [ ] C
** DONE D
Then ~S-<left>~ on line D seems to count subheadings:
* [0/1] A
- [ ] B
- [ ] C
** TODO D
Then ~C-c C-c~ on [ of line A seems to count list items again:
* [0/2] A
- [ ] B
- [ ] C
** TODO D
Then ~C-c -~ on line D makes D a subitem which makes no sense to me:
* [0/2] A
- [ ] B
- [ ] C
- [ ] D
But when I start with this:
#+STARTUP: indent
* [0/2] A
- [ ] B
- [ ] C
** TODO D
Then ~C-c -~ on line D makes D a sibling which I prefer to the above:
#+STARTUP: indent
* [0/2] A
- [ ] B
- [ ] C
- [ ] D
Except that the automatic update like ~C-c C-c~ on [ of line A is missing:
#+STARTUP: indent
* [0/3] A
- [ ] B
- [ ] C
- [ ] D
(This is Org on today's master.)
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Statistic cookies for headings and list items
2020-03-31 19:31 Statistic cookies for headings and list items Michael Brand
@ 2020-06-01 13:29 ` Bastien
2020-06-01 13:51 ` Eric S Fraga
2020-06-13 16:15 ` Nicolas Goaziou
0 siblings, 2 replies; 5+ messages in thread
From: Bastien @ 2020-06-01 13:29 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode
Hi Michael,
thanks for reporting this.
Michael Brand <michael.ch.brand@gmail.com> writes:
> Is this all intended behaviour?
Well, no, I think the current behavior is confusing.
> When I start with ~C-c C-c~ on [ of line A, Org seems to count list items:
> Then ~S-<left>~ on line D seems to count subheadings:
> Then ~C-c C-c~ on [ of line A seems to count list items again:
> Then ~C-c -~ on line D makes D a subitem which makes no sense to me:
> But when I start with this:
> Then ~C-c -~ on line D makes D a sibling which I prefer to the above:
> Except that the automatic update like ~C-c C-c~ on [ of line A is missing:
I believe we cannot fix this without a discussion on the design first.
Here are a few solutions I can imagine:
1. when an entry contains both a list (as its direct contents) and
subheadings, only consider subheadings in the stats calculation.
2. when an entry contains both a list (as its direct contents) and
subheadings, only consider the list in the calculation.
3. if one of the two options above, allow the user to use a custom
property to change the default (e.g. CUSTOM_STATS: list/headings)
and consider the list of the subheadings.
4. add a new syntax rule to consider that stats at the beginning of
a headline are always for subheadings, while stats at the end of
a headline are always for the first list in direct contents.
I'd be in favor of (1) (without (3)) to keep things simple, but
maybe that's a good opportunity to consider (4). I think (3) is
only relevant if we go for (2), which I don't really like.
What do you think?
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Statistic cookies for headings and list items
2020-06-01 13:29 ` Bastien
@ 2020-06-01 13:51 ` Eric S Fraga
2020-06-13 16:15 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2020-06-01 13:51 UTC (permalink / raw)
To: Bastien; +Cc: Michael Brand, Org Mode
On Monday, 1 Jun 2020 at 15:29, Bastien wrote:
> I believe we cannot fix this without a discussion on the design first.
Good to be able to discuss this. I won't repeat the options but will
give my own views as I do use statistic cookies quite a bit.
I would accept either 1 and/or 2 with or without 3. However, I do not
like option 4 at all as this would simply lead to confusion. There is
no obvious way to understand the implication of the placement of the
cookie by looking at it.
However, what I would really like to have is the option to include both
lists and subheadings (recursively) in the statistics, i.e. count all
below a given point whether the entries appear as a direct contents list
or lists within subheadings. I usually end up with lists of lists,
which is fine (and very lispy... ;-)), but when these get long, they are
harder to navigate and hide/open than headings are.
(note: it could be that what I want is ready possible as I'm often
caught out on this list for missing existing functionality. If so, I
again apologise!)
Thank you!
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-640-g9bc0cc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Statistic cookies for headings and list items
2020-06-01 13:29 ` Bastien
2020-06-01 13:51 ` Eric S Fraga
@ 2020-06-13 16:15 ` Nicolas Goaziou
2021-05-15 20:28 ` Bastien
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2020-06-13 16:15 UTC (permalink / raw)
To: Bastien; +Cc: Michael Brand, Org Mode
Hello,
Bastien <bzg@gnu.org> writes:
> Here are a few solutions I can imagine:
>
> 1. when an entry contains both a list (as its direct contents) and
> subheadings, only consider subheadings in the stats calculation.
>
> 2. when an entry contains both a list (as its direct contents) and
> subheadings, only consider the list in the calculation.
>
> 3. if one of the two options above, allow the user to use a custom
> property to change the default (e.g. CUSTOM_STATS: list/headings)
> and consider the list of the subheadings.
>
> 4. add a new syntax rule to consider that stats at the beginning of
> a headline are always for subheadings, while stats at the end of
> a headline are always for the first list in direct contents.
>
> I'd be in favor of (1) (without (3)) to keep things simple, but
> maybe that's a good opportunity to consider (4). I think (3) is
> only relevant if we go for (2), which I don't really like.
>
> What do you think?
Isn't COOKIE_DATA property there to disambiguate this situation?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Statistic cookies for headings and list items
2020-06-13 16:15 ` Nicolas Goaziou
@ 2021-05-15 20:28 ` Bastien
0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2021-05-15 20:28 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Michael Brand, Org Mode
Hi,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Isn't COOKIE_DATA property there to disambiguate this situation?
Indeed!
FWIW, I fixed a remaining glitch in this area: with COOKIE_DATA set to
"todo", hitting C-c C-c on a checkbox list in a heading still resulted
in the statistics cookie being updated.
I'm closing this now.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-15 20:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-31 19:31 Statistic cookies for headings and list items Michael Brand
2020-06-01 13:29 ` Bastien
2020-06-01 13:51 ` Eric S Fraga
2020-06-13 16:15 ` Nicolas Goaziou
2021-05-15 20:28 ` Bastien
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).