emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: agzam.ibragimov@gmail.com
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: 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	[thread overview]
Message-ID: <CAJZi2B3mWpLv-MDnbs_XNHWgq8nHQGb+1ze0VEbs2SMD3u=kbQ@mail.gmail.com> (raw)
In-Reply-To: <87bmgijv3f.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]

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 <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Ag Ibragimov <agzam.ibragimov@gmail.com> 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.

[-- Attachment #2: Type: text/html, Size: 7359 bytes --]

      reply	other threads:[~2018-05-18 20:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 10:21 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/)] Ag Ibragimov
2018-02-21 14:06 ` Nicolas Goaziou
2018-05-18 20:58   ` agzam.ibragimov [this message]

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='CAJZi2B3mWpLv-MDnbs_XNHWgq8nHQGb+1ze0VEbs2SMD3u=kbQ@mail.gmail.com' \
    --to=agzam.ibragimov@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).