* org-table debugging formula - error
@ 2018-10-11 15:06 Joe Corneli
2018-10-11 17:07 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Joe Corneli @ 2018-10-11 15:06 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: table_gives_error.diff --]
[-- Type: text/x-patch, Size: 530 bytes --]
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)))))
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: org-table debugging formula - error
2018-10-11 15:06 org-table debugging formula - error Joe Corneli
@ 2018-10-11 17:07 ` Nicolas Goaziou
2018-10-12 13:21 ` Joe Corneli
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-10-11 17:07 UTC (permalink / raw)
To: Joe Corneli; +Cc: emacs-orgmode
Hello,
Joe Corneli <holtzermann17@gmail.com> writes:
> 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 cannot reproduce the problem. Could you explain why you do need this patch?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-table debugging formula - error
2018-10-11 17:07 ` Nicolas Goaziou
@ 2018-10-12 13:21 ` Joe Corneli
0 siblings, 0 replies; 3+ messages in thread
From: Joe Corneli @ 2018-10-12 13:21 UTC (permalink / raw)
To: Org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]
Hi, I couldn't reproduce it with emacs -Q and a freshly built version of
org source code. At some point (make-string (car ev) ?\-) on line 2956
of org-table.el was being called with an argument that was a
non-integer-formatted value, namely 570.0.
But since I can't reproduce it at all now this is presumably an entirely
transient issue!
On Thu, Oct 11, 2018 at 6:07 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:
> Hello,
>
> Joe Corneli <holtzermann17@gmail.com> writes:
>
> > 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 cannot reproduce the problem. Could you explain why you do need this
> patch?
>
> Regards,
>
> --
> Nicolas Goaziou
>
[-- Attachment #2: Type: text/html, Size: 3098 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-12 13:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11 15:06 org-table debugging formula - error Joe Corneli
2018-10-11 17:07 ` Nicolas Goaziou
2018-10-12 13:21 ` Joe Corneli
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).