Re: Getting started with budgets in ledger and org-mode

2014-07-21 Thread Alan Schmitt
On 2014-07-20 16:17, Gmail wtmon...@gmail.com writes:

 Alan,

 Thanks for sharing this. I ran across your example when I was
 searching the list but it was a bit beyond me since I hadn't a working
 version of Erik's example at the time. But yours intrigues me. As I
 read this, it appears that you keep all your ledger data in a separate
 file, mescomptes.ledger, is that correct?

Yes, I'm entering transactions and reconciling accounts using
ledger-mode only. The org-mode part is for reporting and dealing with
the budget.

 Am I also correct in thinking that all of the code blocks you shared
 are run from within the same org file?

Yes, but the one I only use is the table (the other code blocks are
there to support it). My workflow usually is (I do this once a week):
- enter the transactions by hand (I like doing it that way as it gives
  me a good sense of how I spend money, tab completion of accounts
  works great for that);
- reconcile with my bank account (the ledger-mode reconcile view is
  most useful for this);
- evaluate the formulas in the big table of my org file and look at
  how much I have left to spend for each envelope.

At the beginning of each month, I may tweak a little the budget, then
I run the last bit of code that generates a ledger transaction from
Unallocated to the Expense envelopes. I copy and paste this
transaction in my ledger file. (Usually I also copy and paste the
scheduled transactions for the coming month, but this is irrelevant to
the org setup.)

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgptVx8qKMoh0.pgp
Description: PGP signature


Re: Getting started with budgets in ledger and org-mode

2014-07-20 Thread Alan Schmitt
On 2014-07-20 03:31, Will Monroe wtmon...@gmail.com writes:

 Thanks, Erik. I guess the basic concepts of double-entry accounting have
 not sunk in very deeply yet ; ) I added assets as you suggested and it
 balanced just fine.

 Also, I appreciate your advice regarding ledger's built in budgeting
 features. I too prefer envelope budgeting and would like to implement
 something like it in my use of org-mode and ledger. I'll try to study
 your example and see if I can't make it work.

I've been using a system very close to the one Erik describes for about
six months now, and it works great. My tweaks are mostly on the org
side, to get a table summarizing what remains in the envelopes, how much
was spent in the current and in the previous month, and average
spending. This is described here:
http://permalink.gmane.org/gmane.comp.finance.ledger.general/5673

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgp_Wv7xK8JNp.pgp
Description: PGP signature


Re: Getting started with budgets in ledger and org-mode

2014-07-20 Thread Gmail
Alan,

Thanks for sharing this.  I ran across your example when I was searching the 
list but it was a bit beyond me since I hadn't a working version of Erik's 
example at the time.  But yours intrigues me.  As I read this, it appears that 
you keep all your ledger data in a separate file, mescomptes.ledger, is that 
correct?  Am I also correct in thinking that all of the code blocks you shared 
are run from within the same org file?

Will


-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Getting started with budgets in ledger and org-mode

2014-07-19 Thread Will Monroe
Hello,

I'm a first-time poster on the ledger listserv although I've spent a
couple of months lurking.  There's been some great correspondence here
and everyone seems willing to help.  Community was an important factor
in my choosing to use ledger to organize my finances.  The simplicity of
storing financial information in a readable text file that can be
manipulated and exported was another.  I'm also enjoying learning some
of the basic accounting concepts!

I'm looking for troubleshooting advice as I attempt to get started using
use budgets with ledger.  I've been happily using ledger in org-mode as
described in the worg tutorial http:bit.ly/1wIGq98  I've had no trouble
using Babel to generate simple reports.  However, I am having trouble
getting the results I expect when it comes to using the budget function
described in the ledger-cli manual here http://bit.ly/UhV1fh

***
To start keeping a budget, put some periodic transactions (see Periodic
Transactions) at the top of your ledger file. A periodic transaction is
almost identical to a regular transaction, except that it begins with a
tilde and has a period expression in place of a payee.

~ Monthly
Expenses:Rent   $500.00
Expenses:Food   $450.00
Expenses:Auto:Gas   $120.00
Expenses:Insurance  $150.00
Expenses:Phone  $125.00
Expenses:Utilities  $100.00
Expenses:Movies  $50.00
Expenses$200.00  ; all other expenses
Assets

~ Yearly
Expenses:Auto:Repair$500.00
Assets
***

These instructions and an example I found elsewhere (although I can't
locate the source now) has led me to believe that I should be able to
generate a comparison between income, expenses, and the budget with code
and a journal that looks like this:

***
#+name: balance and budget
#+begin_src ledger :cmdline  --budget register ^expenses :noweb yes
~ Monthly
 expenses:rent  $500.00
2010/07/22 * Got paid
  assets:bank:checking  $1000.00
  income:salary
2010/07/23 Rent
  expenses:rent  $500.00
  assets:bank:checking
#+end_src
***

When I run the code by typing C-c C-c on the begin_src line, I do not
get any results in the org file as I do with all my other commands
(e.g., when I run bal I get a balance).  I also see this result in
Emacs Messages:

***
Evaluate this ledger code block (balance) on your system? (y or n)  y
executing Ledger code block (balance)...
executing Ledger source code block
ledger -f /tmp/babel-23672nm/ledger-2367yuD --budget register ^expenses
While balancing entry:
~ Monthly
Unbalanced remainder is:
 $500.00
Error: /tmp/babel-23672nm/ledger-2367yuD, line 2: Entry does not balance
Code block evaluation complete.
***

So it seems that the code is being evaluated successfully even though,
in this case, it doesn't balance.  But the output only appears in the
Emacs Messages output and not just beneath the source block as happens
when I evaluate all other code.  I suppose I could use ledger-cli to
output to a file.  But I'd prefer to output directly to the org file itself.

So my questions here are two-fold:

1.  (Specific) Can anyone advise me on how to begin troubleshooting the
lack of output to the org file as described above?
2.  (General) I'm aware that there seem to be other methods to generate
budgets using ledger and org-mode such as the excellent description
provided in Worg here http://bit.ly/1wIGq98 and Sacha Chua's example
http://bit.ly/1p4d1EU with an example file here http://bit.ly/UhV2zW 
However, both are a bit beyond me at the moment.  Would it be advisable
to use one of these approaches instead?  I'd like to avoid spending a
lot of time learning how to create a budget only to find that there is a
simpler method.

Thanks for creating such a elegant piece of software and maintaining a
community of support around it!

All the best,

Will

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting started with budgets in ledger and org-mode

2014-07-19 Thread Erik Hetzner
Hi Will,

At Sat, 19 Jul 2014 11:06:33 -0500,
Will Monroe wrote:
 
 Hello,
 
 […]
 ***
 #+name: balance and budget
 #+begin_src ledger :cmdline  --budget register ^expenses :noweb yes
 ~ Monthly
  expenses:rent  $500.00
 2010/07/22 * Got paid
   assets:bank:checking  $1000.00
   income:salary
 2010/07/23 Rent
   expenses:rent  $500.00
   assets:bank:checking
 #+end_src
 ***

You need another side for your Monthly budget, e.g.

~ Monthly
  expenses:rent  $500.00
  assets

 […]
 
 So it seems that the code is being evaluated successfully even though,
 in this case, it doesn't balance.  But the output only appears in the
 Emacs Messages output and not just beneath the source block as happens
 when I evaluate all other code.  I suppose I could use ledger-cli to
 output to a file.  But I'd prefer to output directly to the org file itself.

It’s not outputting anything because your budget transaction doesn’t
balance.

 So my questions here are two-fold:
 
 1.  (Specific) Can anyone advise me on how to begin troubleshooting the
 lack of output to the org file as described above?
 2.  (General) I'm aware that there seem to be other methods to generate
 budgets using ledger and org-mode such as the excellent description
 provided in Worg here http://bit.ly/1wIGq98 and Sacha Chua's example
 http://bit.ly/1p4d1EU with an example file here http://bit.ly/UhV2zW 
 However, both are a bit beyond me at the moment.  Would it be advisable
 to use one of these approaches instead?  I'd like to avoid spending a
 lot of time learning how to create a budget only to find that there is a
 simpler method.

I didn’t find that ledger’s built in budgeting worked for the kind of
budgeting I wanted to do (“envelope” budgeting), so I wrote:

  http://orgmode.org/worg/org-tutorials/weaving-a-budget.html

but your mileage may vary.

best, Erik

-- 
Sent from my free software system http://fsf.org/.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting started with budgets in ledger and org-mode

2014-07-19 Thread Will Monroe
Thanks, Erik. I guess the basic concepts of double-entry accounting have
not sunk in very deeply yet ; ) I added assets as you suggested and it
balanced just fine.

Also, I appreciate your advice regarding ledger's built in budgeting
features. I too prefer envelope budgeting and would like to implement
something like it in my use of org-mode and ledger. I'll try to study
your example and see if I can't make it work.

Thanks again,

Will

On 07/19/2014 07:56 PM, Erik Hetzner wrote:
 Hi Will,

 At Sat, 19 Jul 2014 11:06:33 -0500,
 Will Monroe wrote:
 Hello,

 [...]
 ***
 #+name: balance and budget
 #+begin_src ledger :cmdline  --budget register ^expenses :noweb yes
 ~ Monthly
  expenses:rent  $500.00
 2010/07/22 * Got paid
   assets:bank:checking  $1000.00
   income:salary
 2010/07/23 Rent
   expenses:rent  $500.00
   assets:bank:checking
 #+end_src
 ***
 You need another side for your Monthly budget, e.g.

 ~ Monthly
   expenses:rent  $500.00
   assets

 [...]

 So it seems that the code is being evaluated successfully even though,
 in this case, it doesn't balance.  But the output only appears in the
 Emacs Messages output and not just beneath the source block as happens
 when I evaluate all other code.  I suppose I could use ledger-cli to
 output to a file.  But I'd prefer to output directly to the org file itself.
 It's not outputting anything because your budget transaction doesn't
 balance.

 So my questions here are two-fold:

 1.  (Specific) Can anyone advise me on how to begin troubleshooting the
 lack of output to the org file as described above?
 2.  (General) I'm aware that there seem to be other methods to generate
 budgets using ledger and org-mode such as the excellent description
 provided in Worg here http://bit.ly/1wIGq98 and Sacha Chua's example
 http://bit.ly/1p4d1EU with an example file here http://bit.ly/UhV2zW 
 However, both are a bit beyond me at the moment.  Would it be advisable
 to use one of these approaches instead?  I'd like to avoid spending a
 lot of time learning how to create a budget only to find that there is a
 simpler method.
 I didn't find that ledger's built in budgeting worked for the kind of
 budgeting I wanted to do (envelope budgeting), so I wrote:

   http://orgmode.org/worg/org-tutorials/weaving-a-budget.html

 but your mileage may vary.

 best, Erik


-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.