Yes, it will fail on the commodity you mention. By convention, only single character currency symbols happen ahead of the value. I will handle multi character commodities without numerals ahead of the value.
I will add the --collapse option. On Mon, Mar 25, 2013 at 1:42 PM, Rémi Vanicat <[email protected]> wrote: > Craig Earls <[email protected]> writes: > >> I completely rewrote it last night. It should do what you want now. > > Yes, it solve my problem. But it fail on commodity that contain > digit. Like with: > > 2012/01/02 * (03DIZ3Q) Bilip > Nyu:sto "A5A" 12.2 > Foo:bar > > (well, there is no error, but your code will believe that it's AA 5 and > not A5A 12.2). > > Mmm, you should also add the --collapse on the "ledger balance" (as in > my last commit of my pull request) because otherwise your code will also > fail if one reconcile an account that have sub account (I just had a > "Can't subtract different commodities (8509.18 "€4,403.13") from (1000 > "€")" when trying that") > > > > >> >> On Sun, Mar 24, 2013 at 6:34 AM, Rémi Vanicat <[email protected]> wrote: >>> Hello, >>> >>> I'm trying to rewrote[1] the ledger-split-commodity-string of the Emacs >>> mode, and I'm wondering about how ledger print some commodity. >>> >>> so the ledger command that is launched is: >>> >>> ledger balance --collapse --empty --format "%(display_total)" Account >>> >>> and I need to know if commodity whose name contain digit, comma or dot >>> will always be inside quote (") in the result of this command >>> (otherwise, it's difficult to tell the difference between the digits in >>> the commodity, and the digits in the amount). >>> >>> >>> >>> [1]:https://github.com/ledger/ledger/pull/167 >>> -- >>> Rémi Vanicat >>> >>> -- >>> >>> --- >>> 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 [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >> >> >> >> -- >> Craig, Corona De Tucson, AZ >> enderw88.wordpress.com > > -- > Rémi Vanicat > > -- > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Craig, Corona De Tucson, AZ enderw88.wordpress.com -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
