* Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)]
@ 2021-04-05 18:56 Nick Dokos
2021-04-07 17:52 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2021-04-05 18:56 UTC (permalink / raw)
To: emacs-orgmode
The following MWE illustrates:
--8<---------------cut here---------------start------------->8---
#+COLUMNS: %25ITEM %6CLOCKSUM{:}
* Goal 3
:PROPERTIES:
:ID: goal_3
:END:
#+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3
#+END
** TODO Task 1
:LOGBOOK:
CLOCK: [2020-01-26 18:05]--[2020-01-26 Mon 19:16] => 1:11
:END:
Task body
*** TODO Subtask 1
:LOGBOOK:
CLOCK: [2020-01-28 Tue 15:45]--[2020-01-28 Tue 16:45] => 1:00
:END:
--8<---------------cut here---------------end--------------->8---
Starting with `emacs -Q foo.org', place the cursor on the `#+BEGIN:
columnview' line and type `C-c C-c`. That produces a table (although
the entries are wrong):
--8<---------------cut here---------------start------------->8---
#+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3
| ITEM | CLOCKSUM |
|-----------+----------|
| Goal 3 | 2:11 |
|-----------+----------|
| Task 1 | 2:11 |
|-----------+----------|
| Subtask 1 | 1:00 |
#+END
--8<---------------cut here---------------end--------------->8---
But then doing it again fails with the following (elided) backtrace:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "The CLOCKSUM property cannot be set with ‘org-entr...")
signal(error ("The CLOCKSUM property cannot be set with ‘org-entr..."))
error("The %s property cannot be set with `org-entry-put'" "CLOCKSUM")
...
org-entry-put(147 "CLOCKSUM" "1:00")
(progn (org-entry-put (point) property new-value))
(if (and update value (not (equal value new-value))) (progn (org-entry-put (point) property new-value)))
(let ((new-value (org-trim summary))) (if (and update value (not (equal value new-value))) (progn (org-entry-put (point) property new-value))))
...
org-columns--compute-spec(("CLOCKSUM" "CLOCKSUM" 6 ":" nil) t)
...
org-columns-compute-all()
...
org-columns(nil nil)
org-columns--capture-view(3 nil nil nil nil 35)
...
org-dblock-write:columnview((:name "columnview" :hlines 4 :id goal_3 :maxlevel 3 :indentation-column 2 :content #("\n" 0 1 (org-category "foo500" wrap-prefix #(" " 0 2 (face org-indent)) line-prefix #(" " 0 2 (face org-indent)) fontified t))))
...
org-update-dblock()
(save-excursion (goto-char (org-element-property :post-affiliated context)) (org-update-dblock))
...
org-ctrl-c-ctrl-c(nil)
--8<---------------cut here---------------end--------------->8---
Part of the problem seems to be that `org-get-entry' manufactures
CLOCKSUM properties out of the CLOCK entries above, but
`org-put-entry' knows that that's a special property and refuses to
put it. But I think the major fail is in `org-columns--compute-spec'
which takes the property at face value and just passes it along. I
believe it needs to do whatever accumulation it is supposed to do and
set a text property to store the value in the headline, but that's
guessing on my part.
I saw this on Emacs SE (the above example is a simplified version of
the example in the post):
https://emacs.stackexchange.com/questions/55164/org-columns-error-the-clocksum-property-cannot-be-set-with-org-entry-put
and it has apparently been reported once before:
https://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00309.html
Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
2.24.33, cairo version 1.16.0) of 2021-02-17
Package: Org mode version 9.4.4 (release_9.4.4-231-gf46925)
--
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)]
2021-04-05 18:56 Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)] Nick Dokos
@ 2021-04-07 17:52 ` Nicolas Goaziou
2021-04-09 17:49 ` Nick Dokos
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2021-04-07 17:52 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> The following MWE illustrates:
>
> --8<---------------cut here---------------start------------->8---
> #+COLUMNS: %25ITEM %6CLOCKSUM{:}
>
> * Goal 3
> :PROPERTIES:
> :ID: goal_3
> :END:
>
> #+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3
>
> #+END
>
> ** TODO Task 1
> :LOGBOOK:
> CLOCK: [2020-01-26 18:05]--[2020-01-26 Mon 19:16] => 1:11
> :END:
>
> Task body
>
> *** TODO Subtask 1
> :LOGBOOK:
> CLOCK: [2020-01-28 Tue 15:45]--[2020-01-28 Tue 16:45] => 1:00
> :END:
>
> --8<---------------cut here---------------end--------------->8---
>
>
> Starting with `emacs -Q foo.org', place the cursor on the `#+BEGIN:
> columnview' line and type `C-c C-c`. That produces a table (although
> the entries are wrong):
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3
> | ITEM | CLOCKSUM |
> |-----------+----------|
> | Goal 3 | 2:11 |
> |-----------+----------|
> | Task 1 | 2:11 |
> |-----------+----------|
> | Subtask 1 | 1:00 |
> #+END
> --8<---------------cut here---------------end--------------->8---
Why do you say the entries are wrong?
> But then doing it again fails with the following (elided) backtrace:
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (error "The CLOCKSUM property cannot be
> set with ‘org-entr...")
I pushed a fix for this error.
It doesn't solve the whole problem, tho. Doing it again will produce
| ITEM | CLOCKSUM |
|-----------+----------|
| Goal 3 | 1:00 |
|-----------+----------|
| Task 1 | 1:00 |
|-----------+----------|
| Subtask 1 | 1:00 |
This looks wrong.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)]
2021-04-07 17:52 ` Nicolas Goaziou
@ 2021-04-09 17:49 ` Nick Dokos
0 siblings, 0 replies; 3+ messages in thread
From: Nick Dokos @ 2021-04-09 17:49 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> | ITEM | CLOCKSUM |
>> |-----------+----------|
>> | Goal 3 | 2:11 |
>> |-----------+----------|
>> | Task 1 | 2:11 |
>> |-----------+----------|
>> | Subtask 1 | 1:00 |
>> #+END
>> --8<---------------cut here---------------end--------------->8---
>
> Why do you say the entries are wrong?
>
Temporary (I hope...) brain damage.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-09 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-05 18:56 Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)] Nick Dokos
2021-04-07 17:52 ` Nicolas Goaziou
2021-04-09 17:49 ` Nick Dokos
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.