all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ob-ledger errors quietly
@ 2020-03-20 14:46 ob-ledger
  2020-03-20 15:45 ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: ob-ledger @ 2020-03-20 14:46 UTC (permalink / raw)
  To: emacs-orgmode

Hello all,

With the following,

(org-babel-do-load-languages
 'org-babel-load-languages
 '((ledger . t)))

And

#+BEGIN_SRC ledger
1970-01-01 example
 A  1
 B
#+END_SRC

Upon typing C-c C-c, I see no errors in echo area, but there is an error hiding in *Messages* buffer, I've included it at the end of this message.

I think more ideal would be if at least there was something in the echo area about the error. I began assuming otherwise, such as maybe ob-ledger was not really a working thing.

I checked the following in a terminal, and the exit code was 1, via "echo $?".

"printf '1970-01-01 example\n A  1\n B' | ledger -f - bal"

Regards,
-Brady

Evaluate this ledger code block on your system? (y or n) y
executing Ledger code block...
executing Ledger source code block
ledger -f /var/folders/z1/48qx4zkd7fzd7phhvlvl01w00000gn/T/babel-iM3fuM/ledger-CQlmp0 bal
While parsing file "/var/folders/z1/48qx4zkd7fzd7phhvlvl01w00000gn/T/babel-iM3fuM/ledger-CQlmp0", line 3:
While balancing transaction from "/var/folders/z1/48qx4zkd7fzd7phhvlvl01w00000gn/T/babel-iM3fuM/ledger-CQlmp0", lines 1-3:
> 1970-01-01 example
>  A  1
>  B
Unbalanced remainder is:
                   1
Amount to balance against:
                   1
Error: Transaction does not balance
Code block evaluation complete.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ob-ledger errors quietly
  2020-03-20 14:46 ob-ledger errors quietly ob-ledger
@ 2020-03-20 15:45 ` Eric S Fraga
  2020-03-20 18:05   ` ob-ledger
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2020-03-20 15:45 UTC (permalink / raw)
  To: ob-ledger; +Cc: emacs-orgmode

On Friday, 20 Mar 2020 at 07:46, ob-ledger@tangential.info wrote:
> #+BEGIN_SRC ledger
> 1970-01-01 example
>  A  1
>  B
> #+END_SRC

This a ledger issue, not org.  You can fix this by using entry names
that are not single letters.  Try AA and BB and it should work.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-432-g73bd24

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ob-ledger errors quietly
  2020-03-20 15:45 ` Eric S Fraga
@ 2020-03-20 18:05   ` ob-ledger
  2020-03-21 15:51     ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: ob-ledger @ 2020-03-20 18:05 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

On Fri, Mar 20, 2020, at 8:45 AM, Eric S Fraga wrote:
> This a ledger issue, not org.

I would hope that if ledger throws an error, with exit code 1 and a message, that ob-ledger might notify me of this. The results were empty and the echo area was blank.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ob-ledger errors quietly
  2020-03-20 18:05   ` ob-ledger
@ 2020-03-21 15:51     ` Eric S Fraga
  0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2020-03-21 15:51 UTC (permalink / raw)
  To: ob-ledger; +Cc: emacs-orgmode

On Friday, 20 Mar 2020 at 11:05, ob-ledger@tangential.info wrote:
> On Fri, Mar 20, 2020, at 8:45 AM, Eric S Fraga wrote:
>> This a ledger issue, not org.
>
> I would hope that if ledger throws an error, with exit code 1 and a
> message, that ob-ledger might notify me of this. The results were
> empty and the echo area was blank.

Yes, better error handling would be good.  You might like to propose
some code?  If ledger does return an error status, that could be caught
and handled, I would imagine.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-433-g4b2628

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-21 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20 14:46 ob-ledger errors quietly ob-ledger
2020-03-20 15:45 ` Eric S Fraga
2020-03-20 18:05   ` ob-ledger
2020-03-21 15:51     ` Eric S Fraga

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.