On Tuesday, December 1, 2020 at 11:26:13 AM UTC+7 [email protected] wrote:

> One question that will remain is what to do with comments immediately 
> preceding and/or following a transaction. Those are often associated with 
> the transaction and slicing and dicing files to put them back together 
> should probably preserve the comments like that. I'd have to inject 
> comments into the grammar in order to do that (that may not be trivial).
>

I've made two or three half-hearted attempts at programmatically 
reformatting ledgers and this is definitely one of the biggest sticking 
points. If comments were an actual part of the transaction -- the way 
docstrings are on a python method, for instance -- it would be great.

But there are some other complications:

- Markers for code folding and just in general how to handle "sections". Do 
you want all of your "#europe-holiday-2019" tagged transactions grouped 
together automatically? Do you want that behaviour for *all* tags? 
(Probably not!)
- How to handle commented out things that should stay close to the 
non-commented things out they are related to. For instance, I have a custom 
fava option commented out. But after reformatting it should still be 
adjacent to all the other fava options!
- Handling de-facto multi-line comments (again, on things that aren't 
transactions, consider a plugin configuration of multiple lines of embedded 
JSON that has been commented out)
- Handling include files
- Comments on things that aren't transactions -- prices, commodities
- Inline comments on individual legs of a transaction. For instance I have 
one transaction that looks like:

2017-08-31 * "Transfer to Vietnam"
  Assets:US:Blah -50 USD
  Expenses:Bank-Fees 10 USD ; charged by correspondent bank on the wire 
transfer
  Assets:VN:Foo 40 USD

- Handling all of the non-transaction things that you probably (maybe?) 
don't want mixed in among transactions. But where *do* you want them? I 
keep all of mine in separate files: prices in one file, balances in 
another, etc.

In the end I felt like there were so many edge cases and I struggled to see 
much real benefit outside of my own OCD.

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/7c27c941-79d8-4d4e-af32-94c394ecf265n%40googlegroups.com.

Reply via email to