I've read the definition of "default" for `commodity` and got that it's not 
designed to do what I want.
Coming back to my questions :-) :

> 1. Is there a way to control formatting for amounts that don't specify a 
currency?
> 2. Is there a way to say that no explicit currency means $?

is at least #1 possible?

So far I've tried adding:
C $1.00 = 1.00
which does the opposite of what I want :-) : it removes $ from reports even 
if I explicitly specify it in my transactions.

And
C 1.00 = $1.00
which causes Ledger to crash:
1 [main] ledger 36968 cygwin_exception::open_stackdumpfile: Dumping stack 
trace to ledger.EXE.stackdump

Using D, as in
D $1,000.00
or
D 1,000.00
also had no effect.

An answer that it's not possible (if it's really not) would also be helpful.

On Sunday, September 9, 2018 at 7:20:52 AM UTC-7, Yuri Khan wrote:
>
> On Sun, Sep 9, 2018 at 8:35 PM psionl0 <[email protected] <javascript:>> 
> wrote: 
>
> >> commodity $ 
> >>   format $1,000.00 
> >>   nomarket 
> >>   default 
> >> 
> >> 2018/01/01 Test 
> >>    Exp 12.00 
> >>    Cash 
>
> > You didn't put the currency unit in your transaction. 
>
> The user expectation here is that marking a commodity as “default” 
> makes it the default commodity that implicitly applies to postings 
> that don’t specify a commodity. This is not an unreasonable idea to 
> arrive at, given that the documentation on ‘commodity’ only says: 
>
>     The ‘default’ sub-directive marks this as the “default” commodity. 
>
> without defining what a “default commodity” is. Later in the 
> documentation, where the ‘D’ directive is described, there is a more 
> complete description of the default commodity, but there is no way for 
> a user to discover that when reading the entry for ‘commodity’. 
>
> I suggest adding a cross-reference from ‘commodity→default’ to ‘D’, or 
> possibly duplicating the definition in ‘commodity→default’. 
>

-- 

--- 
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/d/optout.

Reply via email to