[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-table debugging formula - error
From: |
Joe Corneli |
Subject: |
[O] org-table debugging formula - error |
Date: |
Thu, 11 Oct 2018 16:06:30 +0100 |
User-agent: |
mu4e 1.1.0; emacs 26.1 |
Hello,
I got an error when debugging the behaviour of a formula.
You'll need:
(setq org-table-formula-debug t)
Then with any luck this should allow you to reproduce the error: C-c C-c to run
formula.
| Task | Estimated Effort |
|-----------------------+------------------|
| INTRODUCTION | 9:30 |
|-----------------------+------------------|
| BACKGROUND | |
|-----------------------+------------------|
| FOO WORKFLOW | |
|-----------------------+------------------|
| BAR WORKFLOW | |
|-----------------------+------------------|
| BAZ WORKFLOW | |
|-----------------------+------------------|
| ADDITIONAL WORKFLOWS | 1d 4h 0min |
|-----------------------+------------------|
| FINDINGS | |
|-----------------------+------------------|
| ADDITIONAL ANALYSIS | 24:00 |
|-----------------------+------------------|
| DISCUSSION | |
|-----------------------+------------------|
| BIBLIOGRAPHY | |
|-----------------------+------------------|
| Appendix: Status | |
| TOTAL WORKDAYS NEEDED | 5d 5h 30min |
#+TBLFM: @>$2='(org-duration-from-minutes (apply '+ (map 'list
'org-duration-to-minutes (list @I+1$2 @II+1$2 @III+1$2 @IIII+1$2 @IIIII+1$2
@IIIIII+1$2 @IIIIIII+1$2 @IIIIIIII+1$2))))
I've attached a patch that fixes the problem for me.
I'm on Org mode version 9.1.14 (release_9.1.14-974-ga85ba9 @
/Users/joe/org-mode/lisp/)
Joe
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 8eb38ef68..80de97d21 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2953,7 +2953,7 @@ $xyz-> %s
$1-> %s\n" orig formula form0 form))
(if (consp ev)
(princ (format " %s^\nError: %s"
- (make-string (car ev) ?\-) (nth 1 ev)))
+ (make-string (floor (car ev)) ?\-) (nth 1 ev)))
(princ (format "Result: %s\nFormat: %s\nFinal: %s"
ev (or fmt "NONE")
(if fmt (format fmt (string-to-number ev)) ev)))))
- [O] org-table debugging formula - error,
Joe Corneli <=