emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* refiling tasks and counter cookies
@ 2012-01-05 16:35 Ali Tofigh
  2012-01-05 17:14 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Ali Tofigh @ 2012-01-05 16:35 UTC (permalink / raw)
  To: Mailinglist emacs-orgmode

when refiling todos (C-c C-w), the counter cookies don't update. is
that a known/intended issue?

/ali

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

* Re: refiling tasks and counter cookies
  2012-01-05 16:35 refiling tasks and counter cookies Ali Tofigh
@ 2012-01-05 17:14 ` Bastien
  2012-01-05 17:37   ` Ali Tofigh
  2012-01-19 23:45   ` Ali Tofigh
  0 siblings, 2 replies; 4+ messages in thread
From: Bastien @ 2012-01-05 17:14 UTC (permalink / raw)
  To: Ali Tofigh; +Cc: Mailinglist emacs-orgmode

Hi Ali,

Ali Tofigh <alix.tofigh@gmail.com> writes:

> when refiling todos (C-c C-w), the counter cookies don't update. is
> that a known/intended issue?

This should do:

(add-hook
  'org-after-refile-insert-hook
  'org-update-parent-todo-statistics)

HTH,

-- 
 Bastien

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

* Re: refiling tasks and counter cookies
  2012-01-05 17:14 ` Bastien
@ 2012-01-05 17:37   ` Ali Tofigh
  2012-01-19 23:45   ` Ali Tofigh
  1 sibling, 0 replies; 4+ messages in thread
From: Ali Tofigh @ 2012-01-05 17:37 UTC (permalink / raw)
  To: Bastien; +Cc: Mailinglist emacs-orgmode

thanks for the snippet!

that code solves half the problem: it updates the counter cookie for
the node where the todo item was refiled to, but not for the original
location. I couldn't figure out how to do the second part. any ideas?

/ali

On Thu, Jan 5, 2012 at 12:14, Bastien <bzg@altern.org> wrote:
> Hi Ali,
>
> Ali Tofigh <alix.tofigh@gmail.com> writes:
>
>> when refiling todos (C-c C-w), the counter cookies don't update. is
>> that a known/intended issue?
>
> This should do:
>
> (add-hook
>  'org-after-refile-insert-hook
>  'org-update-parent-todo-statistics)
>
> HTH,
>
> --
>  Bastien

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

* Re: refiling tasks and counter cookies
  2012-01-05 17:14 ` Bastien
  2012-01-05 17:37   ` Ali Tofigh
@ 2012-01-19 23:45   ` Ali Tofigh
  1 sibling, 0 replies; 4+ messages in thread
From: Ali Tofigh @ 2012-01-19 23:45 UTC (permalink / raw)
  To: Bastien; +Cc: Mailinglist emacs-orgmode

On Thu, Jan 5, 2012 at 12:14, Bastien <bzg@altern.org> wrote:
> Hi Ali,
>
> Ali Tofigh <alix.tofigh@gmail.com> writes:
>
>> when refiling todos (C-c C-w), the counter cookies don't update. is
>> that a known/intended issue?
>
> This should do:
>
> (add-hook
>  'org-after-refile-insert-hook
>  'org-update-parent-todo-statistics)

what I need is a org-pre-refile-insert-hook. i looked in org.el and
the org-refile function. could some knowledgeable person on the
mailinglist point me to where I should insert

(run-hooks 'org-pre-refile-insert-hook)

so that the snippet below

(add-hook
 'org-pre-refile-insert-hook
 'org-update-parent-todo-statistics)

together with Bastien's helpful snippet above, would result in
updating of the cookie counters of both the source and destination?

/ali

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

end of thread, other threads:[~2012-01-19 23:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 16:35 refiling tasks and counter cookies Ali Tofigh
2012-01-05 17:14 ` Bastien
2012-01-05 17:37   ` Ali Tofigh
2012-01-19 23:45   ` Ali Tofigh

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