On Tue, May 20, 2014 at 6:06 AM, Stefano Zacchiroli <z...@upsilon.cc> wrote:

> On Sat, May 17, 2014 at 11:37:01PM -0400, Martin Blais wrote:
> > Now the truly, wonderfully great thing is how much *power* we have
> > using our little text files. It's exhilarating. I can write a little
> > script that renames my accounts automatically - I use xx-rename - look
> > at it in visual diff, run bean-web on it, look at the reports, decide
> > if I like it or not, revert and retry if I screwed up until I get it
> > right.
>
> Very much agreed.  Although that comes at the price of either
> sacrificing the correct surface syntax (e.g. right indentation,
> alignment, etc.), or of writing quite complex text patching scripts.
>

I've just been living with the mess for the most part, but sometimes when I
do that kind of rename I'll include the whitespace of the longer account so
it remains aligned; it's a bad solution however, doesn't always work.


In particular, I'm personally annoyed that when I batchly update ledger
> files to rename accounts, transaction amounts easily become unaligned.
> So, before (git) committing I go through them with ledger-mode and C-c
> C-q them to fix alignment.  I've written Python code to emit properly
> aligned transactions when generating transaction templates from my bank
> statements, but I haven't gone as far as doing that around plain old
> sed.
>
> Do your scripts take care of that too?
>

Not yet but it has been annoying me too.



> Do we need a ledger-sed or something of the sort?  Or maybe something
> simpler, such as a ledger-indent?


I need one.  I'll write one. This is an easy thing to do... I'll align on
the first currency to the position of the longest account + a few chars.

-- 

--- 
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.

Reply via email to