Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting metadata indentation #55

Open
TRSx80 opened this issue Jul 27, 2024 · 0 comments
Open

Posting metadata indentation #55

TRSx80 opened this issue Jul 27, 2024 · 0 comments

Comments

@TRSx80
Copy link
Contributor

TRSx80 commented Jul 27, 2024

Hi Danielle (and others),

I set out this morning to begin hacking away on my parser/writer as mentioned on the mailing list recently, but immediately ran into this.

It has always bothered me that posting metadata is not indented an additional 2 spaces by beancount-mode.

Consider the decision: "scheduled" line in the following:

2013-08-26 * "Buying some shares of Hooli"
  statement: "confirmation-826453.pdf"
  Assets:BTrade:HOOLI      10 HOOL @ {498.45 USD}
    decision: "scheduled"
  Assets:BTrade:Cash

To make sure I did not imagine seeing this, I looked it up in the documentation and indeed, it says:

the additional indentation from the posting is not strictly necessary but it helps with readability

So I had a look around, and if I am interpreting this comment correctly, it seems like it bothers you, too(?).

It does not seem to me like this ever got implemented. I looked through the code (and issues here) as well as starting up a clean, default Emacs and then loading the latest beancount.el (from git), invoking the mode and trying it, but it seems the behavior is as I always remembered it (metadata gets indented 2 spaces just like postings). Did I miss anything?

I started to implement this in my (soon-to-be) downstream library, but then I thought this is something that should better live here. If there is interest, I could try and get a patch together (actually, I'll probably start working on it anyway).

Personally I prefer the additional indentation, but we could make it optional of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant