Re: [O] Bug: org-dblock-update regression in case of :maxlevel 0 [9.0.5 (9.0.5-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20170210/)]
Hello, Christoph LANGE writes: > I have a clocktable that looks as follows. (Once more, I'll be happy to > work this out as a minimum working example – later, don't have time > right now.) > > #+BEGIN: clocktable :block 2017-W01 :maxlevel 0 :scope ("filename.org") > :indent > > The output I got for this from an older Org version (9.0.something, > definitely < 9.0.4) was: > > | File | Headline | Time | > |--+--+| > | | ALL *Total time* | *1:00* | > |--+--+| > | filename.org | *File time* | *1:00* | > > :maxlevel 1 would include level-1 headings _in_ this file, like this: > > | File | Headline | Time | > |--+--+| > | | ALL *Total time* | *1:00* | > |--+--+| > | filename.org | *File time* | *1:00* | > | | Task 1 | 0:05 | > | | Task 2 | 0:55 | > > where filename.org looks like > > * Task 1 > * Task 2 > ... > >> It sounds like a user error to me. > > Maybe the truth is that the handling of :maxlevel 0 was an undocumented > feature? I see. It makes sense. I just couldn't find it. Thanks for the explanation. This is now fixed. Regards, -- Nicolas Goaziou
Re: [O] Bug: org-dblock-update regression in case of :maxlevel 0 [9.0.5 (9.0.5-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20170210/)]
Hi Nicolas, Nicolas Goaziou on 2017-02-13 16:46: > I can reproduce the problem. However, I'm not sure to understand the > meaning of ":maxlevel 0". Don't you mean ":maxlevel 1"? I have a clocktable that looks as follows. (Once more, I'll be happy to work this out as a minimum working example – later, don't have time right now.) #+BEGIN: clocktable :block 2017-W01 :maxlevel 0 :scope ("filename.org") :indent The output I got for this from an older Org version (9.0.something, definitely < 9.0.4) was: | File | Headline | Time | |--+--+| | | ALL *Total time* | *1:00* | |--+--+| | filename.org | *File time* | *1:00* | :maxlevel 1 would include level-1 headings _in_ this file, like this: | File | Headline | Time | |--+--+| | | ALL *Total time* | *1:00* | |--+--+| | filename.org | *File time* | *1:00* | | | Task 1 | 0:05 | | | Task 2 | 0:55 | where filename.org looks like * Task 1 * Task 2 ... > It sounds like a user error to me. Maybe the truth is that the handling of :maxlevel 0 was an undocumented feature? Cheers, Christoph -- Dr. Christoph Lange, Enterprise Information Systems Department Applied Computer Science @ University of Bonn; Fraunhofer IAIS http://langec.wordpress.com/about, Skype duke4701
Re: [O] Bug: org-dblock-update regression in case of :maxlevel 0 [9.0.5 (9.0.5-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20170210/)]
Hello, Christoph LANGE writes: > I believe the following fix > > http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=ccf832e8317dbac7d3ac2b7dfbb515b1292a329c > > introduced a regression. When I want to run org-dblock-update on a > clocktable with :maxlevel 0 (I'll be happy to provide an example), it > fails with > > Debugger entered--Lisp error: (wrong-type-argument wholenump -1) > make-string(-1 124) > > in org-clocktable-write-default, I think in > > (make-string (1- (min maxlevel (or ntcol 100))) ?|) > > to be exact, because (1- maxlevel) is -1. I can reproduce the problem. However, I'm not sure to understand the meaning of ":maxlevel 0". Don't you mean ":maxlevel 1"? It sounds like a user error to me. Regards, -- Nicolas Goaziou
[O] Bug: org-dblock-update regression in case of :maxlevel 0 [9.0.5 (9.0.5-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20170210/)]
Dear Nicolas, dear all, I believe the following fix http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=ccf832e8317dbac7d3ac2b7dfbb515b1292a329c introduced a regression. When I want to run org-dblock-update on a clocktable with :maxlevel 0 (I'll be happy to provide an example), it fails with Debugger entered--Lisp error: (wrong-type-argument wholenump -1) make-string(-1 124) in org-clocktable-write-default, I think in (make-string (1- (min maxlevel (or ntcol 100))) ?|) to be exact, because (1- maxlevel) is -1. Cheers, Christoph Emacs : GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 Package: Org mode version 9.0.5 (9.0.5-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20170210/) current state: == (setq org-id-locations-file "~\\.emacs.d\\.org-id-locations" org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-clock-persist-file "~\\.emacs.d\\org-clock-save.el" org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-time-clocksum-format '(:hours "%d" :require-hours t :minutes ":%02d" :require-minutes t) org-clock-history-length 35 org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-start-on-weekday nil org-clock-into-drawer 2 org-confirm-shell-link-function 'yes-or-no-p org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id org-finalize-agenda-hook '((lambda nil (undo-tree-mode -1)) bh/org-agenda-to-appt) org-clock-idle-time 10 org-agenda-sticky t org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)) org-pretty-entities t org-agenda-custom-commands '(("J" "Interactive TODO dowith and TASK with" ((org-sec-who-view "TODO dowith"))) ("j" "TODO dowith and TASK with" ((org-sec-with-view "TODO dowith") (org-sec-where-view "TODO doat") (org-sec-assigned-with-view "TASK with") (org-sec-stuck-with-view "STUCK with")) ) ("A" "Work todos with doat or dowith" tags-todo "-personal+doat={.+}|dowith={.+}/!-TASK" ((org-agenda-todo-ignore-scheduled nil))) ("H" "All work todos" tags-todo "-personal/!-TASK-MAYBE" ((org-agenda-todo-ignore-scheduled nil))) ("h" "Work todos" tags-todo "-personal-doat={.+}-dowith={.+}/!-TASK" ((org-agenda-todo-ignore-scheduled t))) ("n" "Agenda and all TODOs" ((agenda "") (alltodo "" org-return-follows-link t org-todo-keyword-faces '(("TODO" :foreground "DarkOrange1" :weight bold) ("MAYBE" :foreground "sea green") ("DONE" :foreground "light sea green") ("CANCELLED" :foreground "forest green") ("NEXT" :foreground "red" :weight bold) ("TASK" :foreground "blue")) org-capture-templates '(("j" "Journal" entry (id "00fba618-a215-4d39-a8fd-88f1ffce1fdb") "* %?\nEntered on %U\n %i\n %a" :prepend t) ("w" "Log work task" entry (id "00fba618-a215-4d39-a8fd-88f1ffce1fdb") "* %^{Description} %^g%?" :prepend t :clock-in t :clock-keep t) ("t" "TODO" entry (id "00fba618-a215-4d39-a8fd-88f1ffce1fdb") "* TODO %^{Description}\n DEADLINE: %^{DEADLINE}t" :prepend t) ("T" "TODO (and clock in)" entry (id "00fba618-a215-4d39-a8fd-88f1ffce1fdb") "* TODO %^{Description}\n DEADLINE: %^{DEADLINE}t" :prepend t :clock-in t :clock-resume t) ) org-agenda-include-diary t org-after-todo-state-change-hook '(org-clock-out-if-current) org-from-is-user-regexp nil org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-tags-column -90 org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-log-redeadline 'note org-mode-hook '(org-clock-load org-mode-reftex-setup evil-org-mode #[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