From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Turoff Subject: Problems with including ledger files in org-babel Date: Mon, 12 May 2014 03:27:55 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=485b397dce9bce066404f92ee2e0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjkeT-0007k2-Ny for emacs-orgmode@gnu.org; Mon, 12 May 2014 03:27:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjkeS-0004Tf-KH for emacs-orgmode@gnu.org; Mon, 12 May 2014 03:27:57 -0400 Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:52425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjkeS-0004Tb-Fw for emacs-orgmode@gnu.org; Mon, 12 May 2014 03:27:56 -0400 Received: by mail-yh0-f46.google.com with SMTP id 29so5961917yhl.33 for ; Mon, 12 May 2014 00:27:55 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --485b397dce9bce066404f92ee2e0 Content-Type: text/plain; charset=UTF-8 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 --485b397dce9bce066404f92ee2e0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm trying to prepare a ledger report by including a l= edger 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. =C2=A0org-confirm-babel-evaluate = works perfectly fine with other blocks, like sh, and it works for ledger bl= ocks embedded in org source blocks (described in the tutorial), but I can&#= 39;t get !include to load an external file.

I'm trying to include some ledger content copied fr= om=C2=A0http://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 t= hat tutorial? =C2=A0Is there some other way to include external ledger file= s into org-babel?

This is in org version=C2=A08.2.= 6-14-g063c8b-elpa.

Thanks,

-- Adam
--485b397dce9bce066404f92ee2e0-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Problems with including ledger files in org-babel Date: Mon, 12 May 2014 12:03:08 +0100 Message-ID: <87a9anmf83.fsf@pinto.chemeng.ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjo13-0004o2-Ck for emacs-orgmode@gnu.org; Mon, 12 May 2014 07:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjo0u-0006Ag-3C for emacs-orgmode@gnu.org; Mon, 12 May 2014 07:03:29 -0400 Received: from mail-am1lp0010.outbound.protection.outlook.com ([213.199.154.10]:27161 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjo0t-00067M-TL for emacs-orgmode@gnu.org; Mon, 12 May 2014 07:03:20 -0400 In-Reply-To: (Adam Turoff's message of "Mon, 12 May 2014 03:27:55 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Adam Turoff Cc: emacs-orgmode@gnu.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Turoff Subject: Re: Problems with including ledger files in org-babel Date: Mon, 12 May 2014 12:32:37 -0400 Message-ID: References: <87a9anmf83.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0122971ccc0ccd04f9367ea7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjt9b-0002kR-9u for emacs-orgmode@gnu.org; Mon, 12 May 2014 12:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjt9a-0003rB-BR for emacs-orgmode@gnu.org; Mon, 12 May 2014 12:32:39 -0400 Received: from mail-yh0-x231.google.com ([2607:f8b0:4002:c01::231]:44340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjt9a-0003qU-64 for emacs-orgmode@gnu.org; Mon, 12 May 2014 12:32:38 -0400 Received: by mail-yh0-f49.google.com with SMTP id c41so6481528yho.22 for ; Mon, 12 May 2014 09:32:37 -0700 (PDT) In-Reply-To: <87a9anmf83.fsf@pinto.chemeng.ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Adam Turoff , emacs-orgmode@gnu.org --089e0122971ccc0ccd04f9367ea7 Content-Type: text/plain; charset=UTF-8 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 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 > --089e0122971ccc0ccd04f9367ea7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've tried that, and that doesn't fix the pro= blem.

I'm testing it now on another system, and this actually works (ledg= er.lgr and the org file are in the same directory):

#+begin_src ledger :cmdline -f .ledger.lgr=C2=A0print
#+end_src

It seems like there's some issue wit= h ledger not loading properly, and the error appears to be eaten by org-bab= el. =C2=A0Is there any way to debug what org-babel is seeing here?

Also, I prefer using hledger over ledger. Is that a customiz= able 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 Turo= ff wrote:
> I'm trying to prepare a ledger report by including a ledger file w= ith babel:
>
> #+begin_src ledger :cmdline print
> !include ledger.lgr
> #+end_src

I would suggest you try specifying the full path to the ledger file,<= br> i.e. one starting with / (assuming you're using Linux, say). =C2=A0Babe= l
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=

--089e0122971ccc0ccd04f9367ea7-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Problems with including ledger files in org-babel Date: Mon, 12 May 2014 13:28:35 -0700 Message-ID: References: <87a9anmf83.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjwpy-0005Wg-VA for emacs-orgmode@gnu.org; Mon, 12 May 2014 16:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjwpy-0006uH-5U for emacs-orgmode@gnu.org; Mon, 12 May 2014 16:28:38 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:36952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjwpx-0006u3-U2 for emacs-orgmode@gnu.org; Mon, 12 May 2014 16:28:38 -0400 Received: by mail-we0-f174.google.com with SMTP id k48so7333363wev.19 for ; Mon, 12 May 2014 13:28:36 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Adam Turoff Cc: emacs-orgmode@gnu.org if ledger does not work, you can use sh. i do. On 5/12/14, Adam Turoff 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Turoff Subject: Re: Problems with including ledger files in org-babel Date: Mon, 12 May 2014 21:18:01 -0400 Message-ID: References: <87a9anmf83.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3010ebfdca88f904f93dd55e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk1M3-0007fP-O8 for emacs-orgmode@gnu.org; Mon, 12 May 2014 21:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk1M2-0004Au-Lx for emacs-orgmode@gnu.org; Mon, 12 May 2014 21:18:03 -0400 Received: from mail-yk0-x22b.google.com ([2607:f8b0:4002:c07::22b]:52562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk1M2-0004Al-I6 for emacs-orgmode@gnu.org; Mon, 12 May 2014 21:18:02 -0400 Received: by mail-yk0-f171.google.com with SMTP id 142so6612039ykq.2 for ; Mon, 12 May 2014 18:18:02 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org --20cf3010ebfdca88f904f93dd55e Content-Type: text/plain; charset=UTF-8 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 wrote: > if ledger does not work, you can use sh. i do. > > > On 5/12/14, Adam Turoff 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. > --20cf3010ebfdca88f904f93dd55e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks everyone. =C2=A0I never saw C-c C-v C-v before, so = that pointed me in the right direction.

Most of the issu= e was with my inexperience debugging elisp. =C2=A0The messages buffer point= ed me in the right direction; ledger wasn't emitting any output because= was throwing warning messages. =C2=A0I traced it down to ledger complainin= g 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,

<= div>-- 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. =C2=A0i do.


On 5/12/14, Adam Turoff <adam.t= uroff@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. =C2=A0Is there any way to debu= g what
> org-babel is seeing here?

c-c c-v c-v?

--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress. =C2=A0MANY people have died from it. =C2=A0And ANYBODY can get it.

Denmark: free Karina Hansen NOW.

--20cf3010ebfdca88f904f93dd55e--