* Problems with including ledger files in org-babel
@ 2014-05-12 7:27 Adam Turoff
2014-05-12 11:03 ` Eric S Fraga
0 siblings, 1 reply; 5+ messages in thread
From: Adam Turoff @ 2014-05-12 7:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
I'm trying to prepare a ledger report by including a ledger file with babel:
#+begin_src ledger :cmdline print
!include ledger.lgr
#+end_src
#+RESULTS:
And each time I try and eval the buffer, the results come back blank.
org-confirm-babel-evaluate works perfectly fine with other blocks, like
sh, and it works for ledger blocks embedded in org source blocks (described
in the tutorial), but I can't get !include to load an external file.
I'm trying to include some ledger content copied from
http://orgmode.org/worg/org-tutorials/weaving-a-budget.html , and the
'print' option in ledger should always emit some output.
Is this a known issue that hasn't been updated in that tutorial? Is there
some other way to include external ledger files into org-babel?
This is in org version 8.2.6-14-g063c8b-elpa.
Thanks,
-- Adam
[-- Attachment #2: Type: text/html, Size: 1185 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with including ledger files in org-babel
2014-05-12 7:27 Problems with including ledger files in org-babel Adam Turoff
@ 2014-05-12 11:03 ` Eric S Fraga
2014-05-12 16:32 ` Adam Turoff
0 siblings, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2014-05-12 11:03 UTC (permalink / raw)
To: Adam Turoff; +Cc: emacs-orgmode
On Monday, 12 May 2014 at 03:27, Adam Turoff wrote:
> I'm trying to prepare a ledger report by including a ledger file with babel:
>
> #+begin_src ledger :cmdline print
> !include ledger.lgr
> #+end_src
I would suggest you try specifying the full path to the ledger file,
i.e. one starting with / (assuming you're using Linux, say). Babel
executes in another directory potentially and this could be the source
of the problem.
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-949-g751506
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with including ledger files in org-babel
2014-05-12 11:03 ` Eric S Fraga
@ 2014-05-12 16:32 ` Adam Turoff
2014-05-12 20:28 ` Samuel Wales
0 siblings, 1 reply; 5+ messages in thread
From: Adam Turoff @ 2014-05-12 16:32 UTC (permalink / raw)
To: Adam Turoff, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]
I've tried that, and that doesn't fix the problem.
I'm testing it now on another system, and this actually works (ledger.lgr
and the org file are in the same directory):
#+begin_src ledger :cmdline -f .ledger.lgr print
#+end_src
It seems like there's some issue with ledger not loading properly, and the
error appears to be eaten by org-babel. Is there any way to debug what
org-babel is seeing here?
Also, I prefer using hledger over ledger. Is that a customizable option in
ob-ledger?
Thanks,
-- Adam
On Mon, May 12, 2014 at 7:03 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> On Monday, 12 May 2014 at 03:27, Adam Turoff wrote:
> > I'm trying to prepare a ledger report by including a ledger file with
> babel:
> >
> > #+begin_src ledger :cmdline print
> > !include ledger.lgr
> > #+end_src
>
> I would suggest you try specifying the full path to the ledger file,
> i.e. one starting with / (assuming you're using Linux, say). Babel
> executes in another directory potentially and this could be the source
> of the problem.
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-949-g751506
>
[-- Attachment #2: Type: text/html, Size: 2070 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with including ledger files in org-babel
2014-05-12 16:32 ` Adam Turoff
@ 2014-05-12 20:28 ` Samuel Wales
2014-05-13 1:18 ` Adam Turoff
0 siblings, 1 reply; 5+ messages in thread
From: Samuel Wales @ 2014-05-12 20:28 UTC (permalink / raw)
To: Adam Turoff; +Cc: emacs-orgmode
if ledger does not work, you can use sh. i do.
On 5/12/14, Adam Turoff <adam.turoff@gmail.com> wrote:
> It seems like there's some issue with ledger not loading properly, and the
> error appears to be eaten by org-babel. Is there any way to debug what
> org-babel is seeing here?
c-c c-v c-v?
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. And
ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with including ledger files in org-babel
2014-05-12 20:28 ` Samuel Wales
@ 2014-05-13 1:18 ` Adam Turoff
0 siblings, 0 replies; 5+ messages in thread
From: Adam Turoff @ 2014-05-13 1:18 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Thanks everyone. I never saw C-c C-v C-v before, so that pointed me in the
right direction.
Most of the issue was with my inexperience debugging elisp. The messages
buffer pointed me in the right direction; ledger wasn't emitting any output
because was throwing warning messages. I traced it down to ledger
complaining about a missing newline after the !include line inside the src
block.
And the !include'd file needs to have the full path, as expected.
Thanks again,
-- Adam
On Mon, May 12, 2014 at 4:28 PM, Samuel Wales <samologist@gmail.com> wrote:
> if ledger does not work, you can use sh. i do.
>
>
> On 5/12/14, Adam Turoff <adam.turoff@gmail.com> wrote:
> > It seems like there's some issue with ledger not loading properly, and
> the
> > error appears to be eaten by org-babel. Is there any way to debug what
> > org-babel is seeing here?
>
> c-c c-v c-v?
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress. MANY people have died from it. And
> ANYBODY can get it.
>
> Denmark: free Karina Hansen NOW.
>
[-- Attachment #2: Type: text/html, Size: 1749 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-13 1:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 7:27 Problems with including ledger files in org-babel Adam Turoff
2014-05-12 11:03 ` Eric S Fraga
2014-05-12 16:32 ` Adam Turoff
2014-05-12 20:28 ` Samuel Wales
2014-05-13 1:18 ` Adam Turoff
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.