On this page:
  • In other news…
  • I so rock =)
  • Emacs: Recording ledger entries with org-capture-templates
  • Check out these getting started guides – suggest more!

In other news…

I’m back on the wagon of tracking every expense. There’s a certain
satisfaction in knowing that every cent is accounted for. This time,
I’m using John Wiegley‘s excellent
Ledger command-line accounting
tool. It works with plain text, of course.

I’ve just figured out how to do my fancy earmarked accounting thing.
I’ve partially sorted out my cashflow, but I’m not sure how much I’m
supposed to receive over the next few months or what’ll happen when I
start working. For peace of mind, I’ve earmarked enough money to cover
tuition, rent, and food.

I want the earmarked money to be tracked separately from my real
savings so that I know how much money I can actually touch, but I want
to leave it in my regular high-interest savings account so that I can
earn interest on the whole amount. So I need two reports: one showing
what I can consider free and clear, and another that reconciles with
the account summary from the bank (includes earmarked accounts).

Here’s the transaction setting up earmarked rent:

10.28 Earmarked for rent
   [Savings:Earmarked:Rent]      $4365
   [Assets:Savings:PCFinancial]

and every so often, I’ll post transactions that look like this:

11.02 * PCFinancial ; Transfer for rent payment
   Assets:Savings:PCFinancial     $-485
   Assets:Checking:PCFinancial    $485
   [Assets:Savings:PCFinancial]   $485
   [Assets:Checking:PCFinancial]  $-485
   ; Automatically transfer rent money from Savings to Checking ($485)
   ; This is still part of my earmarked savings until it goes out of Checking
   ; So ledger -s -c bal shouldn't show it as part of my real checking account
   ; or my savings account, but as part of Savings:Earmarked
   ; but ledger -R -s -c bal should show an increase in checking and a decrease in savings
11.05 ! University of Toronto
   Assets:Checking:PCFinancial    $-485
   Expenses:Rent                  $485
   [Savings:Earmarked:Rent]      $-485
   [Assets:Checking:PCFinancial]  $485
   ; Now decrement my earmarked savings
   ; And make sure that Checking reflects actual balance
   ; And that savings is unchanged from before with virtual transactions

The ! signifies a pending transaction that has not yet been cleared,
while * signifies a cleared transaction. ledger can do
partially-cleared transactions too. This is pretty nifty.

Makes me want to have more to track…

On Technorati: ,

Random Emacs symbol: shell-script-mode – Command: Major mode for editing shell scripts.

I so rock =)

I have about 41 pages for my current chapter on taking notes in Emacs, and I still have to write the introduction and wrap-up sections. This means that I’ll need to do some more editing. It’s clearly time to apply another piece of advice from the wonderful book How to Write Fast (While Writing Well), by David Fryxell: don’t over-write, because the time you waste writing more than necessary and then editing down to the required length could be spent writing about something else!

I also rock because I’m getting the hang of writing macros for OpenOffice.org. Basic is not my favorite language and OpenOffice.org macro programming is sufficiently obscure that it’s hard to find examples of what I want to do. OOoMacros.org helped me learn enough to write a few more functions to make my writing life better. I wrote two new functions today: one to mark up wingdings in my code, and another to mark up the source code examples. Both save me lots of tedious work. The wingding function replaced all instances of (1), ;; (1), (2), ;; (2), until (9) and ;; (9) with the corresponding wingding. The example function marked up everything enclosed in <example>..</example> tags, formatting the first and last lines in a different style and using a single-line code style for short examples. Between that and the two functions I’d previously written to format about 80% of my command and keyboard shortcuts, editing is just so much better.

It seems that most people don’t tinker with their tools. I like doing so. I like getting to know what I can do with a tool and how far I can push it. This can be frustrating sometimes (I spent all afternoon trying to get Emacs to play nicely with other weblogs!), but most of the time, it’s both fun and useful. Not only am I saving myself time, I’m also exercising my brain and opening opportunities for other hacks down the line. This is good.

Oh! And W- is giving Ledger a try. The tool he’d been using to keep track of finances dropped some more of his data recently. Because it’s all magic inside, he couldn’t figure out what happened. I’d been going on about how awesome Ledger is, this command-line double-entry accounting tool that provides no bells or whistles but with which I can do all sorts of crazy things. He described how he wanted to budget, and I showed him how to do it. No screencast, but I do plan to review the audio and create some supporting materials for my upcoming article on Ledger and Gnuplot.

Life is good. =)

Emacs: Recording ledger entries with org-capture-templates

I use John Wiegley’s ledger program to keep track of my personal finances. It’s quick, it’s light, and it lets me slice-and-dice my data however I want. I enjoy opening my ledger file and adding transactions to it. (Particularly if it involves income!) Yes, I’m that kind of weird.

I wanted to make it even easier to add entries. Instead of using C-x C-f to find the file, using ESC > to go to the end of the buffer, and typing in the transactions, I decided to add some of my common transactions to org-capture-templates. Here’s the relevant snippet:

(setq org-capture-templates
      (append '(("l" "Ledger entries")
                ("lm" "MBNA" plain
                 (file "~/personal/ledger")
                 "%(org-read-date) %^{Payee}
  Liabilities:MBNA  
  Expenses:%^{Account}  %^{Amount}
")
                ("lc" "Cash" plain
                (file "~/personal/ledger")
	        "%(org-read-date) * %^{Payee}
  Expenses:Cash 
  Expenses:%^{Account}  %^{Amount}
"))
       org-capture-templates))

I’ve bound org-capture to C-c r using (global-set-key (kbd "C-c r") 'org-capture), so now I can use C-c r l m to create an entry for my MBNA Mastercard. This keyboard shortcut might not seem short to you, but if you think about it as C-c remember ledger Mastercard, it makes perfect sense. =) (Besides, org-capture prompts me just in case I forget.)

Hooray for org-capture!

Check out these getting started guides – suggest more!

I’ve been making little one-page guides to help people learn about topics. It turns out they’re fun to make. =) Click on the images for larger versions. Feel free to print out/share!

How can you get started with visual note-taking?

2013-11-14-How-can-you-get-started-with-visual-note-taking.jpg

Getting started with mind-mapping

2013-11-14 Getting started with mind-mapping

Getting started with bulk cooking

2013-11-12 Get started with bulk cooking

Getting started with Ledger

2013-11-12 Get started with Ledger

There’s this one about Emacs too, of course. =)

What else should I write/draw from a beginner’s point of view?  Comment and suggest!

Want to give it a try? Think about something you’ve learned, and draw a one-page beginner’s guide for it. (I’d love to see it!)