Beginner's Questions

104 views
Skip to first unread message

Uwe Ziegenhagen

unread,
Jun 21, 2019, 5:05:07 PM6/21/19
to bean...@googlegroups.com
Hi there, I have a few questions regarding the emacs mode and hope that you can help me:

1) I have created the following file (see the bottom). Given that I want to create another transaction are there any commands I can use as a template (then jumping from field to field via tab). Does anyone of you have maybe yas snippets in use?

2) Given that have (manually) entered the following line next I'd want to enter the accounts

2019-02-23 * "Lebensmittel" 
 
If I press C-c ' I get the following. My expection would be that pressing V<tab> gives me a list in what form ever where I can select the corresponding account. However I just get [no match]

Is my process correct?

Uwe


#### my testfile

option "name_assets"  "Vermoegen"
option "name_liabilities" "Verbindlichkeiten"
option "name_income"  "Einkommen"
option "name_expenses" "Ausgaben"
option "name_equity"  "Eigenkapital"

2019-01-01 open Vermoegen:Girokonto EUR
2019-01-01 open Vermoegen:Barkasse EUR
2019-01-01 open Ausgaben:Lebensmittel
2019-01-01 open Ausgaben:Wohnen:Miete
2019-01-01 open Ausgaben:Wohnen:Nebenkosten
2019-01-01 open Einkommen:Gehalt

2019-01-03 * "Gehalt"
  Einkommen:Gehalt -1000.00 EUR
  Vermoegen:Girokonto 1000.00 EUR

2019-01-15 * "Miete"
  Vermoegen:Girokonto -300.00 EUR
  Ausgaben:Wohnen:Miete 300.00 EUR

2019-01-20 * "Nebenkosten"
  Vermoegen:Girokonto -50.00 EUR
  Ausgaben:Wohnen:Nebenkosten 50.00 EUR

2019-01-17 * "Geld abheben"
  Vermoegen:Girokonto -50.00 EUR
  Vermoegen:Barkasse 50.00 EUR

2019-01-17 * "Lebensmittel"
  Vermoegen:Barkasse -29.95 EUR
  Ausgaben:Lebensmittel 29.95 EUR

2019-01-23 * "Lebensmittel"
  Vermoegen:Girokonto -70.88 EUR
  Ausgaben:Lebensmittel 70.88 EUR




--

Daniele Nicolodi

unread,
Jun 22, 2019, 1:22:03 AM6/22/19
to Beancount
Hello Uwe,

On 21-06-2019 15:04, Uwe Ziegenhagen wrote:
> Hi there, I have a few questions regarding the emacs mode and hope that
> you can help me:
>
> 1) I have created the following file (see the bottom). Given that I want
> to create another transaction are there any commands I can use as a
> template (then jumping from field to field via tab). Does anyone of you
> have maybe yas snippets in use?

I don't feel the need for this of facility. Because of the terseness of
the beancount syntax, there a templating functionality would not spare
you much typing: here is not much more than quotes "" around the
narration that a template could insert for you.

> 2) Given that have (manually) entered the following line next I'd want
> to enter the accounts
>
> 2019-02-23 * "Lebensmittel" 
>  
> If I press C-c ' I get the following. My expection would be that
> pressing V<tab> gives me a list in what form ever where I can select the
> corresponding account. However I just get [no match]
>
> Is my process correct?

It is. But beancount-mode does not read the "name_xxx" options from the
buffer and hardcodes the default English root account root names. It is
not entirely trivial to fix this such that the names are configurable,
because a number of regular expressions used all over the place would
have to be recomputed.

As a work around, you can modify the definition of the
beancount-account-categories constant in beancount.el.

Cheers,
Dan

Uwe Ziegenhagen

unread,
Jun 22, 2019, 3:27:13 AM6/22/19
to Beancount


Am Samstag, 22. Juni 2019 07:22:03 UTC+2 schrieb Daniele Nicolodi:
Hello Uwe,

On 21-06-2019 15:04, Uwe Ziegenhagen wrote:
> Hi there, I have a few questions regarding the emacs mode and hope that
> you can help me:
>
> 1) I have created the following file (see the bottom). Given that I want
> to create another transaction are there any commands I can use as a
> template (then jumping from field to field via tab). Does anyone of you
> have maybe yas snippets in use?

I don't feel the need for this of facility.  Because of the terseness of
the beancount syntax, there a templating functionality would not spare
you much typing: here is not much more than quotes "" around the
narration that a template could insert for you.


What I could imagine is the following: a key combination inserts

a) the current date in ISO notation, e.g. 2019-06-22
b) the "*" as most transactions I enter will be checked
c) the quotation marks "" with the cursor placed between them
d) two tab positions for the at least two accounts  with the amounts.

I'll see if I come up with a snippet, it's something I'll try.

Your remark regarding the fixed values in the .el is highly appreciated. It works nicely.

Uwe

Reply all
Reply to author
Forward
0 new messages