emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: refile from capture template doesn't update org-clock-curre


From: agzam . ibragimov
Subject: Re: [O] Bug: refile from capture template doesn't update org-clock-current-task [9.1.6 (9.1.6-57-gec8590-elpaplus @ /Users/ag.ibragimov/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/)]
Date: Fri, 18 May 2018 13:58:54 -0700

I sumbitted this long time ago and although it looks like it was fixed (it updates the modeline), I just noticed that it still doesn't update `org-clock-current-task` and I think it should, because otherwise there's no way of accessing current-task value from outside of org-mode and  outside of Emacs.
 
Let's say I want to show current task in a third-party bar like yabar or lemonbar.

Calling this 

'emacsclient -e \"(if org-clock-current-task (string-trim (substring-no-properties (org-clock-get-clock-string))) ' )\" 

would not work for a task that was refiled by a capture template.

I'm sorry for nitpicking - I would have tried fixing it myself, I tried diving into the code and I was quickly amazed how complex Org-mode's code is. No wonder no one has ever succeeded in replicating it for other editors. 

Thank you guys for all amazing hard work that doesn't get appreciated enough.


On Wed, Feb 21, 2018 at 6:06 AM, Nicolas Goaziou <address@hidden> wrote:
Hello,

Ag Ibragimov <address@hidden> writes:

> I'm not sure if that's a legitimate bug, just something I have run into
> on my Spacemacs config
>
> # Description
>
> org-clock-current-task doesn't update mode-line after refile on capture
>
> # To reproduce:
>
> Create a capture template with :clock-in and :clock-keep fields, e.g.:
>
> ("i" "Immediate" entry (file "tasks.org")
>      "* ONGOING %?" :clock-in t :clock-resume t :clock-keep t)
>
> Create an item using the template.
> In org-capture dialog - type title, e.g.: "foo"
>
> # Observed behavior:
>
> After refiling (C-c C-c) - the task header doesn't update in the modeline. It shows
> correctly the time, but not the title.
> =org-clock-current-task= contains nil.
> Compare that with the regular way of clocking-in (without using
> capture) - the title and the variable updates correctly

Fixed. Thank you.

Regards,

--
Nicolas Goaziou



--
Regards,
Ag.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]