emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Statistic cookies for headings and list items
Date: Mon, 01 Jun 2020 15:29:23 +0200	[thread overview]
Message-ID: <87zh9mzzgs.fsf@bzg.fr> (raw)
In-Reply-To: CALn3zohYfoyDm6w-AYWsVRSbOCndBPZQyb+YvHcaEby3JEhWMw@mail.gmail.com

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


  reply	other threads:[~2020-06-01 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 19:31 Statistic cookies for headings and list items Michael Brand
2020-06-01 13:29 ` Bastien [this message]
2020-06-01 13:51   ` Eric S Fraga
2020-06-13 16:15   ` Nicolas Goaziou
2021-05-15 20:28     ` Bastien

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=87zh9mzzgs.fsf@bzg.fr \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@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).