* 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/)]
@ 2018-02-19 10:21 Ag Ibragimov
2018-02-21 14:06 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Ag Ibragimov @ 2018-02-19 10:21 UTC (permalink / raw)
To: emacs-orgmode
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
Emacs : GNU Emacs 26.0.91 (build 1, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
of 2018-01-23
Package: Org mode version 9.1.6 (9.1.6-57-gec8590-elpaplus @ /Users/ag.ibragimov/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/)
current state:
==============
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-babel-clojure-backend 'cider
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-blank-before-new-entry nil
org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
org-enforce-todo-dependencies t
org-src-tab-acts-natively t
org-imenu-depth 8
org-agenda-files "~/Dropbox/org/.agenda-files"
org-clock-report-include-clocking-task t
org-mode-hook '(abbrev-mode spacemacs/toggle-visual-line-navigation-on
ag/org-mode-hook org-clock-load
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-block-all append
local]
5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all
append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes
flyspell-mode spacemacs/add-org-surrounds
spacemacs/delay-emoji-cheat-sheet-hook spacemacs/load-yasnippet
toc-org-enable org-download-enable org-bullets-mode
dotspacemacs//prettify-spacemacs-docs
spacemacs//org-babel-do-load-languages spacemacs//evil-org-mode
org-eldoc-load spacemacs//init-company-org-mode company-mode)
org-clock-persist t
org-outline-path-complete-in-steps nil
org-archive-hook '(org-attach-archive-delete-maybe)
org-agenda-restore-windows-after-quit t
org-confirm-elisp-link-function 'yes-or-no-p
org-src-fontify-natively nil
org-startup-with-inline-images t
org-reverse-note-order t
org-timer-done-hook '((lambda nil (hs-alert "-- timer done! --")))
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-babel-load-languages '((emacs-lisp . t) (shell . t) (js . t) (clojure . t)
(sql . t) (shell . t) (ditaa . t) (ruby . t))
org-log-done 'time
org-babel-post-tangle-hook '(ag/set-tangled-file-permissions)
org-ellipsis " ↴"
org-list-demote-modify-bullet '(("+" . "-") ("-" . "+") ("*" . "+"))
org-agenda-span 3
org-fast-tag-selection-single-key t
org-src-lang-modes '(("http" . "ob-http") ("ocaml" . tuareg)
("elisp" . emacs-lisp) ("ditaa" . artist)
("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql)
("calc" . fundamental) ("C" . c) ("cpp" . c++)
("C++" . c++) ("screen" . shell-script) ("shell" . sh)
("bash" . sh))
org-catch-invisible-edits 'smart
org-occur-hook '(org-first-headline-recenter)
org-agenda-mode-hook '(override-evilified-keys)
org-agenda-start-with-log-mode t
org-log-into-drawer t
org-ditaa-jar-path "/usr/local/Cellar/ditaa/0.11.0/libexec/ditaa-0.11.0-standalone.jar"
org-enforce-todo-checkbox-dependencies t
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-todo-keywords '((sequence "TODO" "ONGOING" "DONE"))
org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
org-clock-persist-file "/Users/ag.ibragimov/.emacs.d/.cache/org-clock-save.el"
org-M-RET-may-split-line '((headline))
org-agenda-start-with-clockreport-mode t
org-show-notification-handler 'message
org-babel-tangle-lang-exts '(("ruby" . "rb") ("clojure" . "clj")
("emacs-lisp" . "el") ("elisp" . "el"))
org-refile-allow-creating-parent-nodes 'confirm
org-refile-use-outline-path 'file
org-src-ask-before-returning-to-edit-buffer nil
org-id-locations-file "~/Dropbox/org/.org-id-locations"
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("id" :follow org-id-open)
("rmail" :follow org-rmail-open :store
org-rmail-store-link)
("mhe" :follow org-mhe-open :store org-mhe-store-link)
("irc" :follow org-irc-visit :store org-irc-store-link)
("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
("gnus" :follow org-gnus-open :store org-gnus-store-link)
("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
("w3m" :store org-w3m-store-link) ("file+sys")
("file+emacs")
("orgit-rev" :store orgit-rev-store :follow orgit-rev-open
:export orgit-rev-export :complete
orgit-rev-complete-link)
("orgit-log" :store orgit-log-store :follow orgit-log-open
:export orgit-log-export :complete
orgit-log-complete-link)
("orgit" :store orgit-status-store :follow
orgit-status-open :export orgit-status-export :complete
orgit-status-complete-link)
("doi" :follow org--open-doi-link)
("elisp" :follow org--open-elisp-link)
("file" :complete org-file-complete-link)
("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path))))
("help" :follow org--open-help-link)
("http" :follow
(lambda (path) (browse-url (concat "http:" path))))
("https" :follow
(lambda (path) (browse-url (concat "https:" path))))
("mailto" :follow
(lambda (path) (browse-url (concat "mailto:" path))))
("news" :follow
(lambda (path) (browse-url (concat "news:" path))))
("shell" :follow org--open-shell-link))
org-agenda-skip-scheduled-if-done t
org-log-states-order-reversed nil
org-todo-keyword-faces '(("ONGOING" . "orange"))
org-image-actual-width nil
org-clock-in-switch-to-state "ONGOING"
org-ditaa-eps-jar-path "/Users/ag.ibragimov/.emacs.d/elpa/26.0/develop/contrib/scripts/DitaaEps.jar"
org-src-window-setup 'current-window
org-clock-out-remove-zero-time-clocks t
org-confirm-babel-evaluate nil
org-directory "~/Dropbox/org"
org-agenda-clockreport-parameter-plist '(:link t :maxlevel 5 :fileskip0 t
:compact t :narrow 60)
org-agenda-diary-file "~/Dropbox/org/journal.org"
org-goto-interface 'outline-path-completion
org-agenda-skip-deadline-if-done t
org-default-notes-file "~/Dropbox/org/notes.org"
org-ctrl-k-protect-subtree t
org-list-allow-alphabetical t
org-clock-persist-query-resume nil
)
^ permalink raw reply [flat|nested] 3+ messages in thread
* 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/)]
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
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-02-21 14:06 UTC (permalink / raw)
To: Ag Ibragimov; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* 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/)]
2018-02-21 14:06 ` Nicolas Goaziou
@ 2018-05-18 20:58 ` agzam.ibragimov
0 siblings, 0 replies; 3+ messages in thread
From: agzam.ibragimov @ 2018-05-18 20:58 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: org-mode-email
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-18 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.