Here is the answer:

@tag   sometag
blah
blah
blah
@end tag

tags can also have values.

On Mon, Nov 14, 2011 at 20:49, Craig Earls <[email protected]> wrote:
> I was going through old list archives and came across the tag/pop syntax for
> applying tags to multiple transactions.  I couldn't get it to work
> consistently.
>
> -----------8<------------------ begin test.dat
> ----------------------->8---------------------
>
> tag:  Testpop: group
>
> 2011/11/18 Commissary
>     Expenses:Groceries                       $250.00
>     Assets:Checking
>
> 2011/11/21 USAA P&C
>     Expenses:Insurance:Life                  $150.00
>     Assets:Checking
>
> 2011/11/25 Commissary
>     Expenses:Groceries                       $250.00
>     Assets:Checking
>
> pop
>
> 2011/11/28 Gas
>     Expenses:Utilities:Gas                    $35.91 ; Testpop: inline
>     Assets:Checking
>
> tag: Testpop: last
>
> 2011/11/29 () Hastings
>     Expenses:Battle                        $1066.00
>     Expenses:Reparations                     $30.00
>     Assets:Checking
>
> pop
> -----------8<------------------ end test.dat
> ----------------------->8---------------------
>
> 20:47:08 ~/FinanceData > ledger -f test.dat bal
>            $-1781.91  Assets:Checking
>             $1781.91  Expenses
>             $1066.00    Battle
>              $500.00    Groceries
>              $150.00    Insurance:Life
>               $30.00    Reparations
>               $35.91    Utilities:Gas
> --------------------
>                    0
> 20:47:24 ~/FinanceData > ledger -f test.dat reg --group-by "tag('Testpop')"
> inline
> 2011/11/28 Gas                   Expense:Utilities:Gas       $35.91
> $35.91
> 20:47:31 ~/FinanceData >
>
>
>
>
> --
> Craig, Corona De Tucson, AZ
> enderw88.wordpress.com
>



-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

Reply via email to