Hi all There are some issues with dynamic block for columnview. Attached are four minimal and complete example test files indent*_tbl*.org (remove .txt) with different wrong behaviors dependent on if the dynamic block is indented and if there is already a table from a previous update or not. The test is always C-c C-c on the dynamic block header for columnview with emacs -q, 23.3.
I searched related changes with git bisect to see if by chance I would be able to resolve the issues by myself, but this seems too complicated to me. If they might be interesting, from present to past: - release_7.7-508-ga081581 (2011-11-02): still the same test results as release_6.30d-851-g74a59c0, see next - commit 74a59c0c008e1123a0cadfa9933001bfc773ee85 Author: Carsten Dominik <carsten.domi...@gmail.com> Date: Fri Sep 18 09:12:26 2009 +0100 Allow indented dynamic blocks - test results after change, release_6.30d-851-g74a59c0: | indent0_tbl0.org | nok | Lisp error, see attached backtrace | | indent0_tbl4.org | ok | works as expected | | indent2_tbl0.org | nok | TBLFM deleted | | indent2_tbl4.org | nok | TBLFM deleted | - test results before change, release_6.30d-850-g60bf447: | indent0_tbl0.org | nok | Lisp error, see attached backtrace | | indent0_tbl4.org | ok | works as expected | | indent2_tbl0.org | nok | misread as Local setup | | indent2_tbl4.org | nok | misread as Local setup | - commit 3f1062a15d81aae2f1b10ea540f0d797711b492c Author: Carsten Dominik <carsten.domi...@gmail.com> Date: Mon Sep 8 09:43:41 2008 +0200 Save and restore formulas for column view capture. - test results after change, release_6.06b-53-g3f1062a: | indent0_tbl0.org | nok | Lisp error, see attached backtrace | | indent0_tbl4.org | ok | works as expected | | indent2_tbl0.org | - | indentation not supported | | indent2_tbl4.org | - | indentation not supported | - test results before change, release_6.06b-52-g4aa23cf: | indent0_tbl0.org | nok | TBLFM deleted | | indent0_tbl4.org | nok | TBLFM deleted | | indent2_tbl0.org | - | indentation not supported | | indent2_tbl4.org | - | indentation not supported | Michael
Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("^#" nil) (while (string-match "^#" (car content-lines)) (insert (pop content-lines) "\n")) (progn (while (string-match "^#" ...) (insert ... "\n"))) (if content-lines (progn (while ... ...))) (when content-lines (while (string-match "^#" ...) (insert ... "\n"))) (progn (when (plist-get params :hlines) (setq tmp nil) (while tbl ...) (setq tbl ...)) (when vlines (setq tbl ...) (setq tbl ...)) (setq pos (point)) (when content-lines (while ... ...)) (insert (org-listtable-to-string tbl)) (when (plist-get params :width) (insert "\n|" ...)) (while (setq line ...) (when ... ... ...)) (if recalc (progn ... ...) (goto-char pos) (org-table-align))) (if tbl (progn (when ... ... ... ...) (when vlines ... ...) (setq pos ...) (when content-lines ...) (insert ...) (when ... ...) (while ... ...) (if recalc ... ... ...))) (when tbl (when (plist-get params :hlines) (setq tmp nil) (while tbl ...) (setq tbl ...)) (when vlines (setq tbl ...) (setq tbl ...)) (setq pos (point)) (when content-lines (while ... ...)) (insert (org-listtable-to-string tbl)) (when (plist-get params :width) (insert "\n|" ...)) (while (setq line ...) (when ... ... ...)) (if recalc (progn ... ...) (goto-char pos) (org-table-align))) (let ((pos ...) (hlines ...) (vlines ...) (maxlevel ...) (content-lines ...) (skip-empty-rows ...) tbl id idpos nfields tmp recalc line id-as-string view-file view-pos) (when (setq id ...) (setq id-as-string ...) (cond ... ... ... ... ... ... ...)) (with-current-buffer (if view-file ... ...) (save-excursion ...)) (goto-char pos) (move-marker pos nil) (when tbl (when ... ... ... ...) (when vlines ... ...) (setq pos ...) (when content-lines ...) (insert ...) (when ... ...) (while ... ...) (if recalc ... ... ...))) org-dblock-write:columnview((:name "columnview" :maxlevel 3 :id 114233DF-D019-449E-892C :indentation-column 0 :content #("#+TBLFM: $2 = ceil($3 / 8)\n" 0 26 (fontified t font-lock-fontified t face org-meta-line) 26 27 (fontified t font-lock-fontified t face org-meta-line)))) funcall(org-dblock-write:columnview (:name "columnview" :maxlevel 3 :id 114233DF-D019-449E-892C :indentation-column 0 :content #("#+TBLFM: $2 = ceil($3 / 8)\n" 0 26 (fontified t font-lock-fontified t face org-meta-line) 26 27 (fontified t font-lock-fontified t face org-meta-line)))) (let* ((pos ...) (line ...) (params ...) (name ...) (indent ...) (cmd ...)) (message "Updating dynamic block `%s' at line %d..." name line) (funcall cmd params) (message "Updating dynamic block `%s' at line %d...done" name line) (goto-char pos) (when (and indent ...) (setq indent ...) (save-excursion ... ... ... ...))) (save-window-excursion (let* (... ... ... ... ... ...) (message "Updating dynamic block `%s' at line %d..." name line) (funcall cmd params) (message "Updating dynamic block `%s' at line %d...done" name line) (goto-char pos) (when ... ... ...))) org-update-dblock() (save-excursion (org-update-dblock)) (cond ((or ... org-occur-highlights org-latex-fragment-image-overlays) (and ... ...) (org-remove-occur-highlights) (org-remove-latex-fragment-image-overlays) (message "Temporary highlights/overlays removed from current buffer")) ((and ... ...) (funcall org-finish-function)) ((run-hook-with-args-until-success ...)) ((org-in-regexp org-ts-regexp-both) (org-timestamp-change 0 ...)) ((or ... ...) (call-interactively ...)) ((org-on-target-p) (call-interactively ...)) ((and ... ...) (call-interactively ...)) ((org-on-heading-p) (call-interactively ...)) ((org-at-table\.el-p) (message "Use C-c ' to edit table.el tables")) ((org-at-table-p) (org-table-maybe-eval-formula) (if arg ... ...) (call-interactively ...) (orgtbl-send-table ...)) ((or ... ...) (call-interactively ...)) ((org-at-item-checkbox-p) (let* ... ... ... ... ... ... ... ... ...)) ((org-at-item-p) (let* ... ... ... ... ...)) ((save-excursion ... ...) (beginning-of-line 1) (save-excursion ...)) ((save-excursion ... ...) (cond ... ...)) ((org-clock-update-time-maybe)) (t (or ... ...))) (let ((org-enable-table-editor t)) (cond (... ... ... ... ...) (... ...) (...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ... ... ...) (... ...) (... ...) (... ...) (... ... ...) (... ...) (...) (t ...))) org-ctrl-c-ctrl-c(nil) call-interactively(org-ctrl-c-ctrl-c nil nil)
#+COLUMNS: %50ITEM(Task) %Days %5Effort({Hours}){+} #+STARTUP: odd showall #+BEGIN: columnview :maxlevel 3 :id 62b7c4f5-bc38-411e-b24f-ba9c4adb74da #+TBLFM: $2 = ceil($3 / 8) #+END: * project *** Total of Effort :PROPERTIES: :ID: 62b7c4f5-bc38-411e-b24f-ba9c4adb74da :END: ***** feature ******* TODO task :PROPERTIES: :Effort: 7 :END:
#+COLUMNS: %50ITEM(Task) %Days %5Effort({Hours}){+} #+STARTUP: odd showall #+BEGIN: columnview :maxlevel 3 :id ddb38905-fcbb-473b-99ef-d35194604ffa | Task | Days | {Hours} | |------+------+---------| | | | | | | | | #+TBLFM: $2 = ceil($3 / 8) #+END: * project *** Total of Effort :PROPERTIES: :ID: ddb38905-fcbb-473b-99ef-d35194604ffa :END: ***** feature ******* TODO task :PROPERTIES: :Effort: 7 :END:
#+COLUMNS: %50ITEM(Task) %Days %5Effort({Hours}){+} #+STARTUP: odd showall * custom view #+BEGIN: columnview :maxlevel 3 :id f96484a3-c520-4abf-979e-e8ff2c047c54 #+TBLFM: $2 = ceil($3 / 8) #+END: * project *** Total of Effort :PROPERTIES: :ID: f96484a3-c520-4abf-979e-e8ff2c047c54 :END: ***** feature ******* TODO task :PROPERTIES: :Effort: 7 :END:
#+COLUMNS: %50ITEM(Task) %Days %5Effort({Hours}){+} #+STARTUP: odd showall * custom view #+BEGIN: columnview :maxlevel 3 :id 52d4f620-6f41-414f-89d8-cd3e8e19a2f0 | Task | Days | {Hours} | |------+------+---------| | | | | | | | | #+TBLFM: $2 = ceil($3 / 8) #+END: * project *** Total of Effort :PROPERTIES: :ID: 52d4f620-6f41-414f-89d8-cd3e8e19a2f0 :END: ***** feature ******* TODO task :PROPERTIES: :Effort: 7 :END: