emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Potential feature request – more automatic updating of cookies
@ 2016-07-27 20:21 Jorge Peixoto de Morais Neto
  2016-07-29  3:53 ` Adam Porter
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge Peixoto de Morais Neto @ 2016-07-27 20:21 UTC (permalink / raw)
  To: Emacs-orgmode@gnu.org

Paste the following in an Org buffer:
--8<---------------cut here---------------start------------->8---
* Cookie_a [0/0]
* TODO Dummy_a
* Cookie_b [0/1]
** TODO Dummy_b
--8<---------------cut here---------------end--------------->8---

Within that buffer:
   1. Move point to the line of Dummy_a.
   2. <M-right>
I wished the cookie to be updated to [0/1] but it is not.

Then:
   1. Move point to the line of Dummy_b.
   2. C-c C-x C-w
   3. Move point to the line of Dummy_a at column 0.
   4. C-c C-x C-y
I wished both cookies to be updated.  They are not.

The manual [[info:org#Checkboxes][says]]:
    Checkbox statistic cookies are updated automatically if you toggle
    checkboxes with `C-c C-c' and make new ones with `M-S-<RET>'.  TODO
    statistics cookies update when changing TODO states.  If you delete
    boxes/entries or add/change them by hand, use this command to get things
    back into sync.

Should I request the feature of Org automatically updating cookies when using
structure editing commands such as C-c C-x C-w, C-c C-x C-y, <M-left>,
<M-right> and friends?  Would it be worth the development cost?  I
unfortunately cannot develop it myself.

The point is that C-u C-c # (to update cookies in the entire buffer) takes
long enough that I only call it a few times per week.  This means that cookies
can get out of sync.  Then I try to remember manually invoking C-c # on the
relevant line every time it goes out of sync, but I sometimes omit it.

I figured I should discuss this in the mailing list before submitting a bug
report with org-submit-bug-report.

Regards

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Potential feature request – more automatic updating of cookies
  2016-07-27 20:21 Potential feature request – more automatic updating of cookies Jorge Peixoto de Morais Neto
@ 2016-07-29  3:53 ` Adam Porter
  2016-08-17 19:05   ` Jorge
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Porter @ 2016-07-29  3:53 UTC (permalink / raw)
  To: emacs-orgmode

Jorge Peixoto de Morais Neto <jorge13515@gmail.com> writes:

> Should I request the feature of Org automatically updating cookies when using
> structure editing commands such as C-c C-x C-w, C-c C-x C-y, <M-left>,
> <M-right> and friends?  Would it be worth the development cost?  I
> unfortunately cannot develop it myself.

Hi Jorge,

It might be enough to advise a few functions to call
org-update-statistics-cookies, e.g.:

(advice-add 'org-cut-special :after 'org-update-statistics-cookies)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Potential feature request – more automatic updating of cookies
  2016-07-29  3:53 ` Adam Porter
@ 2016-08-17 19:05   ` Jorge
  2016-09-17 19:34     ` Adam Porter
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge @ 2016-08-17 19:05 UTC (permalink / raw)
  To: Adam Porter; +Cc: org mode

[Now sending to the whole list]
On 29 July 2016 at 00:53, Adam Porter <adam@alphapapa.net> wrote:
> It might be enough to advise a few functions to call
> org-update-statistics-cookies, e.g.:
>
> (advice-add 'org-cut-special :after 'org-update-statistics-cookies)

I haven't yet studied the advice feature.  I'll look into it.  But is
not the proposed feature (more automatic updating of cookies)
important enough that there should be a very quick way to enable it?
I think it should be a user option (that is, a customizable variable).


-- 
- I am Brazilian.  I apologize for possibly bad English and I welcome
corrections.
- Please adopt free formats like PDF, ODF, LaTeX, Vorbis, Opus, WebM and 7z.
- Free software for Android: https://f-droid.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Potential feature request – more automatic updating of cookies
  2016-08-17 19:05   ` Jorge
@ 2016-09-17 19:34     ` Adam Porter
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Porter @ 2016-09-17 19:34 UTC (permalink / raw)
  To: emacs-orgmode

Jorge <jorge13515@gmail.com> writes:

> [Now sending to the whole list]
> On 29 July 2016 at 00:53, Adam Porter <adam@alphapapa.net> wrote:
>> It might be enough to advise a few functions to call
>> org-update-statistics-cookies, e.g.:
>>
>> (advice-add 'org-cut-special :after 'org-update-statistics-cookies)
>
> I haven't yet studied the advice feature.  I'll look into it.  But is
> not the proposed feature (more automatic updating of cookies)
> important enough that there should be a very quick way to enable it?
> I think it should be a user option (that is, a customizable variable).

Sounds to me like it might be a good idea.  :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-17 19:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27 20:21 Potential feature request – more automatic updating of cookies Jorge Peixoto de Morais Neto
2016-07-29  3:53 ` Adam Porter
2016-08-17 19:05   ` Jorge
2016-09-17 19:34     ` Adam Porter

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).