diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -2,8 +2,26 @@
 See also the hledger and project change logs (for user-visible changes).
 
 
-# 1.2 (2016/3/31)
+# 1.3 (2017/6/30)
 
+Deps: allow megaparsec 5.3.
+
+CSV conversion: assigning to the "balance" field name creates balance
+assertions (#537, Dmitry Astapov).
+Doubled minus signs are handled more robustly (fixes #524, Nicolas Wavrant, Simon Michael)
+
+The "uncleared" transaction/posting status, and associated UI flags
+and keys, have been renamed to "unmarked" to remove ambiguity and
+confusion.  This means that we have dropped the `--uncleared` flag,
+and our `-U` flag now matches only unmarked things and not pending
+ones.  See the issue and linked mail list discussion for more
+background.  (#564)
+
+Multiple status: query terms are now OR'd together. (#564)
+
+
+# 1.2 (2017/3/31)
+
 ## journal format
 
 A pipe character can optionally be used to delimit payee names in
@@ -30,7 +48,6 @@
 Allow megaparsec 5.2 (#503)
 
 Rename optserror -> usageError, consolidate with other error functions
-
 
 
 # 1.1 (2016/12/31)
diff --git a/Hledger/Data/Amount.hs b/Hledger/Data/Amount.hs
--- a/Hledger/Data/Amount.hs
+++ b/Hledger/Data/Amount.hs
@@ -61,6 +61,7 @@
   -- ** rendering
   amountstyle,
   showAmount,
+  cshowAmount,
   showAmountWithZeroCommodity,
   showAmountDebug,
   showAmountWithoutPrice,
@@ -95,6 +96,8 @@
   showMixedAmountDebug,
   showMixedAmountWithoutPrice,
   showMixedAmountOneLineWithoutPrice,
+  cshowMixedAmountWithoutPrice,
+  cshowMixedAmountOneLineWithoutPrice,
   showMixedAmountWithZeroCommodity,
   showMixedAmountWithPrecision,
   setMixedAmountPrecision,
@@ -148,7 +151,7 @@
 
 -- | The empty simple amount.
 amount, nullamt :: Amount
-amount = Amount{acommodity="", aquantity=0, aprice=NoPrice, astyle=amountstyle}
+amount = Amount{acommodity="", aquantity=0, aprice=NoPrice, astyle=amountstyle, amultiplier=False}
 nullamt = amount
 
 -- | A temporary value for parsed transactions which had no amount specified.
@@ -239,6 +242,10 @@
 showAmountWithoutPrice :: Amount -> String
 showAmountWithoutPrice a = showAmount a{aprice=NoPrice}
 
+-- | Colour version.
+cshowAmountWithoutPrice :: Amount -> String
+cshowAmountWithoutPrice a = cshowAmount a{aprice=NoPrice}
+
 -- | Get the string representation of an amount, without any price or commodity symbol.
 showAmountWithoutPriceOrCommodity :: Amount -> String
 showAmountWithoutPriceOrCommodity a = showAmount a{acommodity="", aprice=NoPrice}
@@ -260,6 +267,13 @@
 showAmount :: Amount -> String
 showAmount = showAmountHelper False
 
+-- | Colour version. For a negative amount, adds ANSI codes to change the colour, 
+-- currently to hard-coded red.
+cshowAmount :: Amount -> String
+cshowAmount a =
+  (if isNegativeAmount a then color Dull Red else id) $
+  showAmountHelper False a
+
 showAmountHelper :: Bool -> Amount -> String
 showAmountHelper _ Amount{acommodity="AUTO"} = ""
 showAmountHelper showzerocommodity a@(Amount{acommodity=c, aprice=p, astyle=AmountStyle{..}}) =
@@ -559,10 +573,28 @@
       width = maximum $ map (length . showAmount) as
       showfixedwidth = printf (printf "%%%ds" width) . showAmountWithoutPrice
 
+-- | Colour version.
+cshowMixedAmountWithoutPrice :: MixedAmount -> String
+cshowMixedAmountWithoutPrice m = concat $ intersperse "\n" $ map showamt as
+    where
+      (Mixed as) = normaliseMixedAmountSquashPricesForDisplay $ stripPrices m
+      stripPrices (Mixed as) = Mixed $ map stripprice as where stripprice a = a{aprice=NoPrice}
+      width = maximum $ map (length . showAmount) as
+      showamt a = 
+        (if isNegativeAmount a then color Dull Red else id) $
+        printf (printf "%%%ds" width) $ showAmountWithoutPrice a
+
 -- | Get the one-line string representation of a mixed amount, but without
 -- any \@ prices.
 showMixedAmountOneLineWithoutPrice :: MixedAmount -> String
 showMixedAmountOneLineWithoutPrice m = concat $ intersperse ", " $ map showAmountWithoutPrice as
+    where
+      (Mixed as) = normaliseMixedAmountSquashPricesForDisplay $ stripPrices m
+      stripPrices (Mixed as) = Mixed $ map stripprice as where stripprice a = a{aprice=NoPrice}
+
+-- | Colour version.
+cshowMixedAmountOneLineWithoutPrice :: MixedAmount -> String
+cshowMixedAmountOneLineWithoutPrice m = concat $ intersperse ", " $ map cshowAmountWithoutPrice as
     where
       (Mixed as) = normaliseMixedAmountSquashPricesForDisplay $ stripPrices m
       stripPrices (Mixed as) = Mixed $ map stripprice as where stripprice a = a{aprice=NoPrice}
diff --git a/Hledger/Data/AutoTransaction.hs b/Hledger/Data/AutoTransaction.hs
--- a/Hledger/Data/AutoTransaction.hs
+++ b/Hledger/Data/AutoTransaction.hs
@@ -41,24 +41,24 @@
 --
 -- >>> runModifierTransaction Any (ModifierTransaction "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]}
 -- 0000/01/01
---     ping         $1.00
---     pong         $2.00
+--     ping           $1.00
+--     pong           $2.00
 -- <BLANKLINE>
 -- <BLANKLINE>
 -- >>> runModifierTransaction Any (ModifierTransaction "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]}
 -- 0000/01/01
---     ping         $1.00
+--     ping           $1.00
 -- <BLANKLINE>
 -- <BLANKLINE>
 -- >>> runModifierTransaction None (ModifierTransaction "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]}
 -- 0000/01/01
---     ping         $1.00
+--     ping           $1.00
 -- <BLANKLINE>
 -- <BLANKLINE>
--- >>> runModifierTransaction Any (ModifierTransaction "ping" ["pong" `post` amount{acommodity="*", aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]}
+-- >>> runModifierTransaction Any (ModifierTransaction "ping" ["pong" `post` amount{amultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]}
 -- 0000/01/01
---     ping         $2.00
---     pong         $6.00
+--     ping           $2.00
+--     pong           $6.00
 -- <BLANKLINE>
 -- <BLANKLINE>
 runModifierTransaction :: Query -> ModifierTransaction -> (Transaction -> Transaction)
@@ -107,7 +107,7 @@
 postingScale :: Posting -> Maybe Quantity
 postingScale p =
     case amounts $ pamount p of
-        [a] | acommodity a == "*" -> Just $ aquantity a
+        [a] | amultiplier a -> Just $ aquantity a
         _ -> Nothing
 
 runModifierPosting :: Posting -> (Posting -> Posting)
@@ -117,10 +117,12 @@
         , pdate2 = pdate2 p
         , pamount = amount' p
         }
-    amount' =
-        case postingScale p' of
-            Nothing -> const $ pamount p'
-            Just n -> \p -> pamount p `divideMixedAmount` (1/n)
+    amount' = case postingScale p' of
+        Nothing -> const $ pamount p'
+        Just n -> \p -> withAmountType (head $ amounts $ pamount p') $ pamount p `divideMixedAmount` (1/n)
+    withAmountType amount (Mixed as) = case acommodity amount of
+        "" -> Mixed as
+        c -> Mixed [a{acommodity = c, astyle = astyle amount, aprice = aprice amount} | a <- as]
 
 renderPostingCommentDates :: Posting -> Posting
 renderPostingCommentDates p = p { pcomment = comment' }
@@ -136,13 +138,13 @@
 --
 -- >>> mapM_ (putStr . show) $ runPeriodicTransaction (PeriodicTransaction "monthly from 2017/1 to 2017/4" ["hi" `post` usd 1]) nulldatespan
 -- 2017/01/01
---     hi         $1.00
+--     hi           $1.00
 -- <BLANKLINE>
 -- 2017/02/01
---     hi         $1.00
+--     hi           $1.00
 -- <BLANKLINE>
 -- 2017/03/01
---     hi         $1.00
+--     hi           $1.00
 -- <BLANKLINE>
 runPeriodicTransaction :: PeriodicTransaction -> (DateSpan -> [Transaction])
 runPeriodicTransaction pt = generate where
diff --git a/Hledger/Data/Commodity.hs b/Hledger/Data/Commodity.hs
--- a/Hledger/Data/Commodity.hs
+++ b/Hledger/Data/Commodity.hs
@@ -24,7 +24,7 @@
 
 
 -- characters that may not be used in a non-quoted commodity symbol
-nonsimplecommoditychars = "0123456789-+.@;\n \"{}=" :: [Char]
+nonsimplecommoditychars = "0123456789-+.@*;\n \"{}=" :: [Char]
 
 quoteCommoditySymbolIfNeeded s | any (`elem` nonsimplecommoditychars) (T.unpack s) = "\"" <> s <> "\""
                                | otherwise = s
diff --git a/Hledger/Data/Journal.hs b/Hledger/Data/Journal.hs
--- a/Hledger/Data/Journal.hs
+++ b/Hledger/Data/Journal.hs
@@ -346,7 +346,7 @@
                                     ,depth=depth
                                     ,fMetadata=md
                                     } =
-    filterJournalTransactionsByClearedStatus cleared .
+    filterJournalTransactionsByStatus cleared .
     filterJournalPostingsByDepth depth .
     filterJournalTransactionsByAccount apats .
     filterJournalTransactionsByMetadata md .
@@ -366,7 +366,7 @@
                                 ,fMetadata=md
                                 } =
     filterJournalPostingsByRealness real .
-    filterJournalPostingsByClearedStatus cleared .
+    filterJournalPostingsByStatus cleared .
     filterJournalPostingsByEmpty empty .
     filterJournalPostingsByDepth depth .
     filterJournalPostingsByAccount apats .
@@ -393,16 +393,16 @@
 
 -- | Keep only transactions which have the requested cleared/uncleared
 -- status, if there is one.
-filterJournalTransactionsByClearedStatus :: Maybe Bool -> Journal -> Journal
-filterJournalTransactionsByClearedStatus Nothing j = j
-filterJournalTransactionsByClearedStatus (Just val) j@Journal{jtxns=ts} = j{jtxns=filter match ts}
+filterJournalTransactionsByStatus :: Maybe Bool -> Journal -> Journal
+filterJournalTransactionsByStatus Nothing j = j
+filterJournalTransactionsByStatus (Just val) j@Journal{jtxns=ts} = j{jtxns=filter match ts}
     where match = (==val).tstatus
 
 -- | Keep only postings which have the requested cleared/uncleared status,
 -- if there is one.
-filterJournalPostingsByClearedStatus :: Maybe Bool -> Journal -> Journal
-filterJournalPostingsByClearedStatus Nothing j = j
-filterJournalPostingsByClearedStatus (Just c) j@Journal{jtxns=ts} = j{jtxns=map filterpostings ts}
+filterJournalPostingsByStatus :: Maybe Bool -> Journal -> Journal
+filterJournalPostingsByStatus Nothing j = j
+filterJournalPostingsByStatus (Just c) j@Journal{jtxns=ts} = j{jtxns=map filterpostings ts}
     where filterpostings t@Transaction{tpostings=ps} = t{tpostings=filter ((==c) . postingCleared) ps}
 
 -- | Strip out any virtual postings, if the flag is true, otherwise do
@@ -561,11 +561,13 @@
 -- depends on display precision. Reports only the first error encountered.
 journalBalanceTransactions :: Bool -> Journal -> Either String Journal
 journalBalanceTransactions assrt j =
-  runST $ journalBalanceTransactionsST assrt (journalNumberTransactions j)
-  (newArray_ (1, genericLength $ jtxns j)
-   :: forall s. ST s (STArray s Integer Transaction))
-  (\arr tx -> writeArray arr (tindex tx) tx)
-  $ fmap (\txns -> j{ jtxns = txns}) . getElems
+  runST $ 
+    journalBalanceTransactionsST 
+      assrt -- check balance assertions also ?
+      (journalNumberTransactions j) -- journal to process
+      (newArray_ (1, genericLength $ jtxns j) :: forall s. ST s (STArray s Integer Transaction)) -- initialise state
+      (\arr tx -> writeArray arr (tindex tx) tx)    -- update state
+      (fmap (\txns -> j{ jtxns = txns}) . getElems) -- summarise state
 
 
 -- | Generalization used in the definition of
@@ -939,7 +941,7 @@
              tsourcepos=nullsourcepos,
              tdate=parsedate "2008/01/01",
              tdate2=Nothing,
-             tstatus=Uncleared,
+             tstatus=Unmarked,
              tcode="",
              tdescription="income",
              tcomment="",
@@ -956,7 +958,7 @@
              tsourcepos=nullsourcepos,
              tdate=parsedate "2008/06/01",
              tdate2=Nothing,
-             tstatus=Uncleared,
+             tstatus=Unmarked,
              tcode="",
              tdescription="gift",
              tcomment="",
@@ -973,7 +975,7 @@
              tsourcepos=nullsourcepos,
              tdate=parsedate "2008/06/02",
              tdate2=Nothing,
-             tstatus=Uncleared,
+             tstatus=Unmarked,
              tcode="",
              tdescription="save",
              tcomment="",
@@ -1007,7 +1009,7 @@
              tsourcepos=nullsourcepos,
              tdate=parsedate "2008/12/31",
              tdate2=Nothing,
-             tstatus=Uncleared,
+             tstatus=Unmarked,
              tcode="",
              tdescription="pay off",
              tcomment="",
diff --git a/Hledger/Data/Posting.hs b/Hledger/Data/Posting.hs
--- a/Hledger/Data/Posting.hs
+++ b/Hledger/Data/Posting.hs
@@ -81,7 +81,7 @@
 nullposting = Posting
                 {pdate=Nothing
                 ,pdate2=Nothing
-                ,pstatus=Uncleared
+                ,pstatus=Unmarked
                 ,paccount=""
                 ,pamount=nullmixedamt
                 ,pcomment=""
@@ -96,6 +96,7 @@
 post :: AccountName -> Amount -> Posting
 post acct amt = posting {paccount=acct, pamount=Mixed [amt]}
 
+-- Get the original posting, if any.
 originalPosting :: Posting -> Posting
 originalPosting p = fromMaybe p $ porigin p
 
@@ -163,14 +164,15 @@
                 ,maybe Nothing (Just . tdate) $ ptransaction p
                 ]
 
--- | Get a posting's cleared status: cleared or pending if those are
--- explicitly set, otherwise the cleared status of its parent
--- transaction, or uncleared if there is no parent transaction. (Note
--- Uncleared's ambiguity, it can mean "uncleared" or "don't know".
-postingStatus :: Posting -> ClearedStatus
+-- | Get a posting's status. This is cleared or pending if those are
+-- explicitly set on the posting, otherwise the status of its parent
+-- transaction, or unmarked if there is no parent transaction. (Note
+-- the ambiguity, unmarked can mean "posting and transaction are both 
+-- unmarked" or "posting is unmarked and don't know about the transaction".
+postingStatus :: Posting -> Status
 postingStatus Posting{pstatus=s, ptransaction=mt}
-  | s == Uncleared = case mt of Just t  -> tstatus t
-                                Nothing -> Uncleared
+  | s == Unmarked = case mt of Just t  -> tstatus t
+                               Nothing -> Unmarked
   | otherwise = s
 
 -- | Implicit tags for this transaction.
diff --git a/Hledger/Data/Transaction.hs b/Hledger/Data/Transaction.hs
--- a/Hledger/Data/Transaction.hs
+++ b/Hledger/Data/Transaction.hs
@@ -95,7 +95,7 @@
                     tsourcepos=nullsourcepos,
                     tdate=nulldate,
                     tdate2=Nothing,
-                    tstatus=Uncleared,
+                    tstatus=Unmarked,
                     tcode="",
                     tdescription="",
                     tcomment="",
@@ -133,7 +133,7 @@
     nulltransaction{
       tdate=parsedate "2012/05/14",
       tdate2=Just $ parsedate "2012/05/15",
-      tstatus=Uncleared,
+      tstatus=Unmarked,
       tcode="code",
       tdescription="desc",
       tcomment="tcomment1\ntcomment2\n",
@@ -212,14 +212,17 @@
     ++ newlinecomments
     | postingblock <- postingblocks]
   where
-    postingblocks = [map rstrip $ lines $ concatTopPadded [account, "  ", amount, assertion, samelinecomment] | amount <- shownAmounts]
+    postingblocks = [map rstrip $ lines $ concatTopPadded [statusandaccount, "  ", amount, assertion, samelinecomment] | amount <- shownAmounts]
     assertion = maybe "" ((" = " ++) . showAmountWithZeroCommodity) $ pbalanceassertion p
-    account =
-      indent $
-        showstatus p ++ fitString (Just acctwidth) Nothing False True (showAccountName Nothing (ptype p) (paccount p))
+    statusandaccount = indent $ fitString (Just $ minwidth) Nothing False True $ pstatusandacct p
         where
-          showstatus p = if pstatus p == Cleared then "* " else ""
-          acctwidth = maximum $ map (textWidth . paccount) ps
+          -- pad to the maximum account name width, plus 2 to leave room for status flags, to keep amounts aligned  
+          minwidth = maximum $ map ((2+) . textWidth . T.pack . pacctstr) ps
+          pstatusandacct p' = pstatusprefix p' ++ pacctstr p'
+          pstatusprefix p' | null s    = ""
+                           | otherwise = s ++ " "
+            where s = show $ pstatus p'
+          pacctstr p' = showAccountName Nothing (ptype p') (paccount p')
 
     -- currently prices are considered part of the amount string when right-aligning amounts
     shownAmounts
@@ -536,11 +539,11 @@
      assertEqual "show a balanced transaction, eliding last amount"
        (unlines
         ["2007/01/28 coopportunity"
-        ,"    expenses:food:groceries        $47.18"
+        ,"    expenses:food:groceries          $47.18"
         ,"    assets:checking"
         ,""
         ])
-       (let t = Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "coopportunity" "" []
+       (let t = Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "coopportunity" "" []
                 [posting{paccount="expenses:food:groceries", pamount=Mixed [usd 47.18], ptransaction=Just t}
                 ,posting{paccount="assets:checking", pamount=Mixed [usd (-47.18)], ptransaction=Just t}
                 ] ""
@@ -550,11 +553,11 @@
      assertEqual "show a balanced transaction, no eliding"
        (unlines
         ["2007/01/28 coopportunity"
-        ,"    expenses:food:groceries        $47.18"
-        ,"    assets:checking               $-47.18"
+        ,"    expenses:food:groceries          $47.18"
+        ,"    assets:checking                 $-47.18"
         ,""
         ])
-       (let t = Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "coopportunity" "" []
+       (let t = Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "coopportunity" "" []
                 [posting{paccount="expenses:food:groceries", pamount=Mixed [usd 47.18], ptransaction=Just t}
                 ,posting{paccount="assets:checking", pamount=Mixed [usd (-47.18)], ptransaction=Just t}
                 ] ""
@@ -565,12 +568,12 @@
      assertEqual "show an unbalanced transaction, should not elide"
        (unlines
         ["2007/01/28 coopportunity"
-        ,"    expenses:food:groceries        $47.18"
-        ,"    assets:checking               $-47.19"
+        ,"    expenses:food:groceries          $47.18"
+        ,"    assets:checking                 $-47.19"
         ,""
         ])
        (showTransaction
-        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "coopportunity" "" []
+        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "coopportunity" "" []
          [posting{paccount="expenses:food:groceries", pamount=Mixed [usd 47.18]}
          ,posting{paccount="assets:checking", pamount=Mixed [usd (-47.19)]}
          ] ""))
@@ -579,11 +582,11 @@
      assertEqual "show an unbalanced transaction with one posting, should not elide"
        (unlines
         ["2007/01/28 coopportunity"
-        ,"    expenses:food:groceries        $47.18"
+        ,"    expenses:food:groceries          $47.18"
         ,""
         ])
        (showTransaction
-        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "coopportunity" "" []
+        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "coopportunity" "" []
          [posting{paccount="expenses:food:groceries", pamount=Mixed [usd 47.18]}
          ] ""))
 
@@ -595,7 +598,7 @@
         ,""
         ])
        (showTransaction
-        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "coopportunity" "" []
+        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "coopportunity" "" []
          [posting{paccount="expenses:food:groceries", pamount=missingmixedamt}
          ] ""))
 
@@ -603,12 +606,12 @@
      assertEqual "show a transaction with a priced commodityless amount"
        (unlines
         ["2010/01/01 x"
-        ,"    a        1 @ $2"
+        ,"    a          1 @ $2"
         ,"    b"
         ,""
         ])
        (showTransaction
-        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2010/01/01") Nothing Uncleared "" "x" "" []
+        (txnTieKnot $ Transaction 0 nullsourcepos (parsedate "2010/01/01") Nothing Unmarked "" "x" "" []
          [posting{paccount="a", pamount=Mixed [num 1 `at` (usd 2 `withPrecision` 0)]}
          ,posting{paccount="b", pamount= missingmixedamt}
          ] ""))
@@ -616,19 +619,19 @@
   ,"balanceTransaction" ~: do
      assertBool "detect unbalanced entry, sign error"
                     (isLeft $ balanceTransaction Nothing
-                           (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "test" "" []
+                           (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "test" "" []
                             [posting{paccount="a", pamount=Mixed [usd 1]}
                             ,posting{paccount="b", pamount=Mixed [usd 1]}
                             ] ""))
 
      assertBool "detect unbalanced entry, multiple missing amounts"
                     (isLeft $ balanceTransaction Nothing
-                           (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "test" "" []
+                           (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "test" "" []
                             [posting{paccount="a", pamount=missingmixedamt}
                             ,posting{paccount="b", pamount=missingmixedamt}
                             ] ""))
 
-     let e = balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Uncleared "" "" "" []
+     let e = balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2007/01/28") Nothing Unmarked "" "" "" []
                            [posting{paccount="a", pamount=Mixed [usd 1]}
                            ,posting{paccount="b", pamount=missingmixedamt}
                            ] "")
@@ -639,7 +642,7 @@
                         Right e' -> (pamount $ last $ tpostings e')
                         Left _ -> error' "should not happen")
 
-     let e = balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Uncleared "" "" "" []
+     let e = balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Unmarked "" "" "" []
                            [posting{paccount="a", pamount=Mixed [usd 1.35]}
                            ,posting{paccount="b", pamount=Mixed [eur (-1)]}
                            ] "")
@@ -651,49 +654,49 @@
                         Left _ -> error' "should not happen")
 
      assertBool "balanceTransaction balances based on cost if there are unit prices" (isRight $
-       balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Uncleared "" "" "" []
+       balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Unmarked "" "" "" []
                            [posting{paccount="a", pamount=Mixed [usd 1 `at` eur 2]}
                            ,posting{paccount="a", pamount=Mixed [usd (-2) `at` eur 1]}
                            ] ""))
 
      assertBool "balanceTransaction balances based on cost if there are total prices" (isRight $
-       balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Uncleared "" "" "" []
+       balanceTransaction Nothing (Transaction 0 nullsourcepos (parsedate "2011/01/01") Nothing Unmarked "" "" "" []
                            [posting{paccount="a", pamount=Mixed [usd 1    @@ eur 1]}
                            ,posting{paccount="a", pamount=Mixed [usd (-2) @@ eur 1]}
                            ] ""))
 
   ,"isTransactionBalanced" ~: do
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ,posting{paccount="c", pamount=Mixed [usd (-1.00)], ptransaction=Just t}
              ] ""
      assertBool "detect balanced" (isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ,posting{paccount="c", pamount=Mixed [usd (-1.01)], ptransaction=Just t}
              ] ""
      assertBool "detect unbalanced" (not $ isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ] ""
      assertBool "detect unbalanced, one posting" (not $ isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 0], ptransaction=Just t}
              ] ""
      assertBool "one zero posting is considered balanced for now" (isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ,posting{paccount="c", pamount=Mixed [usd (-1.00)], ptransaction=Just t}
              ,posting{paccount="d", pamount=Mixed [usd 100], ptype=VirtualPosting, ptransaction=Just t}
              ] ""
      assertBool "virtual postings don't need to balance" (isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ,posting{paccount="c", pamount=Mixed [usd (-1.00)], ptransaction=Just t}
              ,posting{paccount="d", pamount=Mixed [usd 100], ptype=BalancedVirtualPosting, ptransaction=Just t}
              ] ""
      assertBool "balanced virtual postings need to balance among themselves" (not $ isTransactionBalanced Nothing t)
-     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Uncleared "" "a" "" []
+     let t = Transaction 0 nullsourcepos (parsedate "2009/01/01") Nothing Unmarked "" "a" "" []
              [posting{paccount="b", pamount=Mixed [usd 1.00], ptransaction=Just t}
              ,posting{paccount="c", pamount=Mixed [usd (-1.00)], ptransaction=Just t}
              ,posting{paccount="d", pamount=Mixed [usd 100], ptype=BalancedVirtualPosting, ptransaction=Just t}
diff --git a/Hledger/Data/Types.hs b/Hledger/Data/Types.hs
--- a/Hledger/Data/Types.hs
+++ b/Hledger/Data/Types.hs
@@ -158,10 +158,11 @@
 instance NFData Commodity
 
 data Amount = Amount {
-      acommodity :: CommoditySymbol,
-      aquantity  :: Quantity,
-      aprice     :: Price,           -- ^ the (fixed) price for this amount, if any
-      astyle     :: AmountStyle
+      acommodity  :: CommoditySymbol,
+      aquantity   :: Quantity,
+      aprice      :: Price,           -- ^ the (fixed) price for this amount, if any
+      astyle      :: AmountStyle,
+      amultiplier :: Bool             -- ^ amount is a multipier for AutoTransactions
     } deriving (Eq,Ord,Typeable,Data,Generic)
 
 instance NFData Amount
@@ -179,20 +180,22 @@
 type TagValue = Text
 type Tag = (TagName, TagValue)  -- ^ A tag name and (possibly empty) value.
 
-data ClearedStatus = Uncleared | Pending | Cleared
-  deriving (Eq,Ord,Typeable,Data,Generic)
+-- | The status of a transaction or posting, recorded with a status mark
+-- (nothing, !, or *). What these mean is ultimately user defined.
+data Status = Unmarked | Pending | Cleared
+  deriving (Eq,Ord,Bounded,Enum,Typeable,Data,Generic)
 
-instance NFData ClearedStatus
+instance NFData Status
 
-instance Show ClearedStatus where -- custom show.. bad idea.. don't do it..
-  show Uncleared = ""
+instance Show Status where -- custom show.. bad idea.. don't do it..
+  show Unmarked = ""
   show Pending   = "!"
   show Cleared   = "*"
 
 data Posting = Posting {
       pdate             :: Maybe Day,         -- ^ this posting's date, if different from the transaction's
       pdate2            :: Maybe Day,         -- ^ this posting's secondary date, if different from the transaction's
-      pstatus           :: ClearedStatus,
+      pstatus           :: Status,
       paccount          :: AccountName,
       pamount           :: MixedAmount,
       pcomment          :: Text,              -- ^ this posting's comment lines, as a single non-indented multi-line string
@@ -224,7 +227,7 @@
       tsourcepos               :: GenericSourcePos,
       tdate                    :: Day,
       tdate2                   :: Maybe Day,
-      tstatus                  :: ClearedStatus,
+      tstatus                  :: Status,
       tcode                    :: Text,
       tdescription             :: Text,
       tcomment                 :: Text,      -- ^ this transaction's comment lines, as a single non-indented multi-line string
diff --git a/Hledger/Query.hs b/Hledger/Query.hs
--- a/Hledger/Query.hs
+++ b/Hledger/Query.hs
@@ -79,7 +79,7 @@
            | Acct Regexp      -- ^ match postings whose account matches this regexp
            | Date DateSpan    -- ^ match if primary date in this date span
            | Date2 DateSpan   -- ^ match if secondary date in this date span
-           | Status ClearedStatus  -- ^ match txns/postings with this cleared status (Status Uncleared matches all states except cleared)
+           | StatusQ Status  -- ^ match txns/postings with this status
            | Real Bool        -- ^ match if "realness" (involves a real non-virtual account ?) has this value
            | Amt OrdPlus Quantity  -- ^ match if the amount's numeric quantity is less than/greater than/equal to/unsignedly equal to some value
            | Sym Regexp       -- ^ match if the entire commodity symbol is matched by this regexp
@@ -104,7 +104,7 @@
   show (Acct r)      = "Acct "   ++ show r
   show (Date ds)     = "Date ("  ++ show ds ++ ")"
   show (Date2 ds)    = "Date2 (" ++ show ds ++ ")"
-  show (Status b)    = "Status " ++ show b
+  show (StatusQ b)    = "StatusQ " ++ show b
   show (Real b)      = "Real "   ++ show b
   show (Amt ord qty) = "Amt "    ++ show ord ++ " " ++ show qty
   show (Sym r)       = "Sym "    ++ show r
@@ -155,15 +155,17 @@
 -- Multiple terms are combined as follows:
 -- 1. multiple account patterns are OR'd together
 -- 2. multiple description patterns are OR'd together
--- 3. then all terms are AND'd together
+-- 3. multiple status patterns are OR'd together
+-- 4. then all terms are AND'd together
 parseQuery :: Day -> T.Text -> (Query,[QueryOpt])
 parseQuery d s = (q, opts)
   where
     terms = words'' prefixes s
     (pats, opts) = partitionEithers $ map (parseQueryTerm d) terms
     (descpats, pats') = partition queryIsDesc pats
-    (acctpats, otherpats) = partition queryIsAcct pats'
-    q = simplifyQuery $ And $ [Or acctpats, Or descpats] ++ otherpats
+    (acctpats, pats'') = partition queryIsAcct pats'
+    (statuspats, otherpats) = partition queryIsStatus pats''
+    q = simplifyQuery $ And $ [Or acctpats, Or descpats, Or statuspats] ++ otherpats
 
 tests_parseQuery = [
   "parseQuery" ~: do
@@ -268,7 +270,7 @@
                                     Right (_,span) -> Left $ Date span
 parseQueryTerm _ (T.stripPrefix "status:" -> Just s) =
         case parseStatus s of Left e   -> error' $ "\"status:"++T.unpack s++"\" gave a parse error: " ++ e
-                              Right st -> Left $ Status st
+                              Right st -> Left $ StatusQ st
 parseQueryTerm _ (T.stripPrefix "real:" -> Just s) = Left $ Real $ parseBool s || T.null s
 parseQueryTerm _ (T.stripPrefix "amt:" -> Just s) = Left $ Amt ord q where (ord, q) = parseAmountQueryTerm s
 parseQueryTerm _ (T.stripPrefix "empty:" -> Just s) = Left $ Empty $ parseBool s
@@ -288,11 +290,11 @@
     "a" `gives` (Left $ Acct "a")
     "acct:expenses:autres d\233penses" `gives` (Left $ Acct "expenses:autres d\233penses")
     "not:desc:a b" `gives` (Left $ Not $ Desc "a b")
-    "status:1" `gives` (Left $ Status Cleared)
-    "status:*" `gives` (Left $ Status Cleared)
-    "status:!" `gives` (Left $ Status Pending)
-    "status:0" `gives` (Left $ Status Uncleared)
-    "status:" `gives` (Left $ Status Uncleared)
+    "status:1" `gives` (Left $ StatusQ Cleared)
+    "status:*" `gives` (Left $ StatusQ Cleared)
+    "status:!" `gives` (Left $ StatusQ Pending)
+    "status:0" `gives` (Left $ StatusQ Unmarked)
+    "status:" `gives` (Left $ StatusQ Unmarked)
     "real:1" `gives` (Left $ Real True)
     "date:2008" `gives` (Left $ Date $ DateSpan (Just $ parsedate "2008/01/01") (Just $ parsedate "2009/01/01"))
     "date:from 2012/5/17" `gives` (Left $ Date $ DateSpan (Just $ parsedate "2012/05/17") Nothing)
@@ -362,10 +364,10 @@
            where (n,v) = T.break (=='=') s
 
 -- | Parse the value part of a "status:" query, or return an error.
-parseStatus :: T.Text -> Either String ClearedStatus
+parseStatus :: T.Text -> Either String Status
 parseStatus s | s `elem` ["*","1"] = Right Cleared
               | s `elem` ["!"]     = Right Pending
-              | s `elem` ["","0"]  = Right Uncleared
+              | s `elem` ["","0"]  = Right Unmarked
               | otherwise          = Left $ "could not parse "++show s++" as a status (should be *, ! or empty)"
 
 -- | Parse the boolean value part of a "status:" query. "1" means true,
@@ -431,7 +433,7 @@
   let (q,p) `gives` r = assertEqual "" r (filterQuery p q)
   (Any, queryIsDepth) `gives` Any
   (Depth 1, queryIsDepth) `gives` Depth 1
-  (And [And [Status Cleared,Depth 1]], not . queryIsDepth) `gives` Status Cleared
+  (And [And [StatusQ Cleared,Depth 1]], not . queryIsDepth) `gives` StatusQ Cleared
   -- (And [Date nulldatespan, Not (Or [Any, Depth 1])], queryIsDepth) `gives` And [Not (Or [Depth 1])]
  ]
 
@@ -478,7 +480,7 @@
 queryIsReal _ = False
 
 queryIsStatus :: Query -> Bool
-queryIsStatus (Status _) = True
+queryIsStatus (StatusQ _) = True
 queryIsStatus _ = False
 
 queryIsEmpty :: Query -> Bool
@@ -673,8 +675,7 @@
     where matchesPosting p = regexMatchesCI r $ T.unpack $ paccount p -- XXX pack
 matchesPosting (Date span) p = span `spanContainsDate` postingDate p
 matchesPosting (Date2 span) p = span `spanContainsDate` postingDate2 p
-matchesPosting (Status Uncleared) p = postingStatus p /= Cleared
-matchesPosting (Status s) p = postingStatus p == s
+matchesPosting (StatusQ s) p = postingStatus p == s
 matchesPosting (Real v) p = v == isReal p
 matchesPosting q@(Depth _) Posting{paccount=a} = q `matchesAccount` a
 matchesPosting q@(Amt _ _) Posting{pamount=amt} = q `matchesMixedAmount` amt
@@ -691,15 +692,15 @@
    "matchesPosting" ~: do
     -- matching posting status..
     assertBool "positive match on cleared posting status"  $
-                   (Status Cleared)  `matchesPosting` nullposting{pstatus=Cleared}
+                   (StatusQ Cleared)  `matchesPosting` nullposting{pstatus=Cleared}
     assertBool "negative match on cleared posting status"  $
-               not $ (Not $ Status Cleared)  `matchesPosting` nullposting{pstatus=Cleared}
-    assertBool "positive match on unclered posting status" $
-                   (Status Uncleared) `matchesPosting` nullposting{pstatus=Uncleared}
-    assertBool "negative match on unclered posting status" $
-               not $ (Not $ Status Uncleared) `matchesPosting` nullposting{pstatus=Uncleared}
+               not $ (Not $ StatusQ Cleared)  `matchesPosting` nullposting{pstatus=Cleared}
+    assertBool "positive match on unmarked posting status" $
+                   (StatusQ Unmarked) `matchesPosting` nullposting{pstatus=Unmarked}
+    assertBool "negative match on unmarked posting status" $
+               not $ (Not $ StatusQ Unmarked) `matchesPosting` nullposting{pstatus=Unmarked}
     assertBool "positive match on true posting status acquired from transaction" $
-                   (Status Cleared) `matchesPosting` nullposting{pstatus=Uncleared,ptransaction=Just nulltransaction{tstatus=Cleared}}
+                   (StatusQ Cleared) `matchesPosting` nullposting{pstatus=Unmarked,ptransaction=Just nulltransaction{tstatus=Cleared}}
     assertBool "real:1 on real posting" $ (Real True) `matchesPosting` nullposting{ptype=RegularPosting}
     assertBool "real:1 on virtual posting fails" $ not $ (Real True) `matchesPosting` nullposting{ptype=VirtualPosting}
     assertBool "real:1 on balanced virtual posting fails" $ not $ (Real True) `matchesPosting` nullposting{ptype=BalancedVirtualPosting}
@@ -731,8 +732,7 @@
 matchesTransaction q@(Acct _) t = any (q `matchesPosting`) $ tpostings t
 matchesTransaction (Date span) t = spanContainsDate span $ tdate t
 matchesTransaction (Date2 span) t = spanContainsDate span $ transactionDate2 t
-matchesTransaction (Status Uncleared) t = tstatus t /= Cleared
-matchesTransaction (Status s) t = tstatus t == s
+matchesTransaction (StatusQ s) t = tstatus t == s
 matchesTransaction (Real v) t = v == hasRealPostings t
 matchesTransaction q@(Amt _ _) t = any (q `matchesPosting`) $ tpostings t
 matchesTransaction (Empty _) _ = True
diff --git a/Hledger/Read/Common.hs b/Hledger/Read/Common.hs
--- a/Hledger/Read/Common.hs
+++ b/Hledger/Read/Common.hs
@@ -169,12 +169,12 @@
 --- * parsers
 --- ** transaction bits
 
-statusp :: TextParser m ClearedStatus
+statusp :: TextParser m Status
 statusp =
   choice'
     [ many spacenonewline >> char '*' >> return Cleared
     , many spacenonewline >> char '!' >> return Pending
-    , return Uncleared
+    , return Unmarked
     ]
     <?> "cleared status"
 
@@ -371,30 +371,39 @@
   return $ case sign of Just '-' -> "-"
                         _        -> ""
 
+multiplierp :: TextParser m Bool
+multiplierp = do
+  multiplier <- optional $ oneOf ("*" :: [Char])
+  return $ case multiplier of Just '*' -> True
+                              _        -> False
+
 leftsymbolamountp :: Monad m => JournalStateParser m Amount
 leftsymbolamountp = do
   sign <- lift signp
+  m <- lift multiplierp
   c <- lift commoditysymbolp
   sp <- lift $ many spacenonewline
   (q,prec,mdec,mgrps) <- lift numberp
   let s = amountstyle{ascommodityside=L, ascommodityspaced=not $ null sp, asprecision=prec, asdecimalpoint=mdec, asdigitgroups=mgrps}
   p <- priceamountp
   let applysign = if sign=="-" then negate else id
-  return $ applysign $ Amount c q p s
+  return $ applysign $ Amount c q p s m
   <?> "left-symbol amount"
 
 rightsymbolamountp :: Monad m => JournalStateParser m Amount
 rightsymbolamountp = do
+  m <- lift multiplierp
   (q,prec,mdec,mgrps) <- lift numberp
   sp <- lift $ many spacenonewline
   c <- lift commoditysymbolp
   p <- priceamountp
   let s = amountstyle{ascommodityside=R, ascommodityspaced=not $ null sp, asprecision=prec, asdecimalpoint=mdec, asdigitgroups=mgrps}
-  return $ Amount c q p s
+  return $ Amount c q p s m
   <?> "right-symbol amount"
 
 nosymbolamountp :: Monad m => JournalStateParser m Amount
 nosymbolamountp = do
+  m <- lift multiplierp
   (q,prec,mdec,mgrps) <- lift numberp
   p <- priceamountp
   -- apply the most recently seen default commodity and style to this commodityless amount
@@ -402,7 +411,7 @@
   let (c,s) = case defcs of
         Just (defc,defs) -> (defc, defs{asprecision=max (asprecision defs) prec})
         Nothing          -> ("", amountstyle{asprecision=prec, asdecimalpoint=mdec, asdigitgroups=mgrps})
-  return $ Amount c q p s
+  return $ Amount c q p s m
   <?> "no-symbol amount"
 
 commoditysymbolp :: TextParser m CommoditySymbol
diff --git a/Hledger/Read/CsvReader.hs b/Hledger/Read/CsvReader.hs
--- a/Hledger/Read/CsvReader.hs
+++ b/Hledger/Read/CsvReader.hs
@@ -498,21 +498,23 @@
 journalfieldnamep :: CsvRulesParser String
 journalfieldnamep = lift (pdbg 2 "trying journalfieldnamep") >> choiceInState (map string journalfieldnames)
 
-journalfieldnames =
-  [-- pseudo fields:
-   "amount-in"
+-- Transaction fields and pseudo fields for CSV conversion. 
+-- Names must precede any other name they contain, for the parser 
+-- (amount-in before amount; date2 before date). TODO: fix
+journalfieldnames = [
+   "account1"
+  ,"account2"
+  ,"amount-in"
   ,"amount-out"
+  ,"amount"
+  ,"balance"
+  ,"code"
+  ,"comment"
   ,"currency"
-   -- standard fields:
   ,"date2"
   ,"date"
-  ,"status"
-  ,"code"
   ,"description"
-  ,"amount"
-  ,"account1"
-  ,"account2"
-  ,"comment"
+  ,"status"
   ]
 
 assignmentseparatorp :: CsvRulesParser ()
@@ -625,7 +627,7 @@
       ]
     status      =
       case mfieldtemplate "status" of
-        Nothing  -> Uncleared
+        Nothing  -> Unmarked
         Just str -> either statuserror id .
                     runParser (statusp <* eof) "" .
                     T.pack $ render str
@@ -639,7 +641,7 @@
     comment     = maybe "" render $ mfieldtemplate "comment"
     precomment  = maybe "" render $ mfieldtemplate "precomment"
     currency    = maybe (fromMaybe "" mdefaultcurrency) render $ mfieldtemplate "currency"
-    amountstr   = (currency++) $ negateIfParenthesised $ getAmountStr rules record
+    amountstr   = (currency++) $ simplifySign $ getAmountStr rules record
     amount      = either amounterror (Mixed . (:[])) $ runParser (evalStateT (amountp <* eof) mempty) "" $ T.pack amountstr
     amounterror err = error' $ unlines
       ["error: could not parse \""++amountstr++"\" as an amount"
@@ -663,6 +665,18 @@
                    _         -> "expenses:unknown"
     account1    = T.pack $ maybe "" render (mfieldtemplate "account1") `or` defaccount1
     account2    = T.pack $ maybe "" render (mfieldtemplate "account2") `or` defaccount2
+    balance     = maybe Nothing (parsebalance.render) $ mfieldtemplate "balance"
+    parsebalance str 
+      | all isSpace str  = Nothing
+      | otherwise = Just $ either (balanceerror str) id $ runParser (evalStateT (amountp <* eof) mempty) "" $ T.pack $ (currency++) $ simplifySign str
+    balanceerror str err = error' $ unlines
+      ["error: could not parse \""++str++"\" as balance amount"
+      ,showRecord record
+      ,"the balance rule is:      "++(fromMaybe "" $ mfieldtemplate "balance")
+      ,"the currency rule is:    "++(fromMaybe "unspecified" $ mfieldtemplate "currency")
+      ,"the default-currency is: "++fromMaybe "unspecified" mdefaultcurrency
+      ,"the parse error is:      "++show err
+      ]
 
     -- build the transaction
     t = nulltransaction{
@@ -676,7 +690,7 @@
       tpreceding_comment_lines = T.pack precomment,
       tpostings                =
         [posting {paccount=account2, pamount=amount2, ptransaction=Just t}
-        ,posting {paccount=account1, pamount=amount1, ptransaction=Just t}
+        ,posting {paccount=account1, pamount=amount1, ptransaction=Just t, pbalanceassertion=balance}
         ]
       }
 
@@ -697,9 +711,15 @@
     (Nothing, Just _,  Just _)  -> error' $ "both amount-in and amount-out have a value\n"++showRecord record
     _                           -> error' $ "found values for amount and for amount-in/amount-out - please use either amount or amount-in/amount-out\n"++showRecord record
 
-negateIfParenthesised :: String -> String
-negateIfParenthesised ('(':s) | lastMay s == Just ')' = negateStr $ init s
-negateIfParenthesised s                               = s
+type CsvAmountString = String
+
+-- | Canonicalise the sign in a CSV amount string.
+-- Such strings can be parenthesized, which is equivalent to having a minus sign.
+-- Also they can end up with a double minus sign, which cancels out.
+simplifySign :: CsvAmountString -> CsvAmountString
+simplifySign ('(':s) | lastMay s == Just ')' = simplifySign $ negateStr $ init s
+simplifySign ('-':'-':s) = s
+simplifySign s = s
 
 negateStr :: String -> String
 negateStr ('-':s) = s
diff --git a/Hledger/Read/JournalReader.hs b/Hledger/Read/JournalReader.hs
--- a/Hledger/Read/JournalReader.hs
+++ b/Hledger/Read/JournalReader.hs
@@ -470,7 +470,7 @@
      nulltransaction{
       tdate=parsedate "2012/05/14",
       tdate2=Just $ parsedate "2012/05/15",
-      tstatus=Uncleared,
+      tstatus=Unmarked,
       tcode="code",
       tdescription="desc",
       tcomment=" tcomment1\n tcomment2\n ttag1: val1\n",
diff --git a/Hledger/Reports/BalanceReport.hs b/Hledger/Reports/BalanceReport.hs
--- a/Hledger/Reports/BalanceReport.hs
+++ b/Hledger/Reports/BalanceReport.hs
@@ -407,7 +407,7 @@
           tsourcepos=nullsourcepos,
           tdate=parsedate "2008/01/01",
           tdate2=Just $ parsedate "2009/01/01",
-          tstatus=Uncleared,
+          tstatus=Unmarked,
           tcode="",
           tdescription="income",
           tcomment="",
diff --git a/Hledger/Reports/PostingsReport.hs b/Hledger/Reports/PostingsReport.hs
--- a/Hledger/Reports/PostingsReport.hs
+++ b/Hledger/Reports/PostingsReport.hs
@@ -266,8 +266,8 @@
    (Any, samplejournal) `gives` 11
    -- register --depth just clips account names
    (Depth 2, samplejournal) `gives` 11
-   (And [Depth 1, Status Cleared, Acct "expenses"], samplejournal) `gives` 2
-   (And [And [Depth 1, Status Cleared], Acct "expenses"], samplejournal) `gives` 2
+   (And [Depth 1, StatusQ Cleared, Acct "expenses"], samplejournal) `gives` 2
+   (And [And [Depth 1, StatusQ Cleared], Acct "expenses"], samplejournal) `gives` 2
 
    -- with query and/or command-line options
    assertEqual "" 11 (length $ snd $ postingsReport defreportopts Any samplejournal)
diff --git a/Hledger/Reports/ReportOptions.hs b/Hledger/Reports/ReportOptions.hs
--- a/Hledger/Reports/ReportOptions.hs
+++ b/Hledger/Reports/ReportOptions.hs
@@ -15,6 +15,8 @@
   checkReportOpts,
   flat_,
   tree_,
+  reportOptsToggleStatus,
+  simplifyStatuses,
   whichDateFromOpts,
   journalSelectingAmountFromOpts,
   queryFromOpts,
@@ -34,12 +36,15 @@
 #if !MIN_VERSION_base(4,8,0)
 import Data.Functor.Compat ((<$>))
 #endif
+import Data.List
 import Data.Maybe
 import qualified Data.Text as T
 import Data.Typeable (Typeable)
 import Data.Time.Calendar
 import Data.Default
 import Safe
+import System.Console.ANSI (hSupportsANSI)
+import System.IO (stdout)
 import Test.HUnit
 import Text.Megaparsec.Error
 
@@ -71,7 +76,7 @@
 data ReportOpts = ReportOpts {
      period_         :: Period
     ,interval_       :: Interval
-    ,clearedstatus_  :: Maybe ClearedStatus
+    ,statuses_       :: [Status]  -- ^ Zero, one, or two statuses to be matched
     ,cost_           :: Bool
     ,depth_          :: Maybe Int
     ,display_        :: Maybe DisplayExp
@@ -92,6 +97,7 @@
     ,no_total_       :: Bool
     ,value_          :: Bool
     ,pretty_tables_  :: Bool
+    ,color_          :: Bool
  } deriving (Show, Data, Typeable)
 
 instance Default ReportOpts where def = defreportopts
@@ -120,15 +126,17 @@
     def
     def
     def
+    def
 
 rawOptsToReportOpts :: RawOpts -> IO ReportOpts
 rawOptsToReportOpts rawopts = checkReportOpts <$> do
-  d <- getCurrentDay
   let rawopts' = checkRawOpts rawopts
+  d <- getCurrentDay
+  color <- hSupportsANSI stdout
   return defreportopts{
      period_      = periodFromRawOpts d rawopts'
     ,interval_    = intervalFromRawOpts rawopts'
-    ,clearedstatus_ = clearedStatusFromRawOpts rawopts'
+    ,statuses_    = statusesFromRawOpts rawopts'
     ,cost_        = boolopt "cost" rawopts'
     ,depth_       = maybeintopt "depth" rawopts'
     ,display_     = maybedisplayopt d rawopts'
@@ -147,6 +155,7 @@
     ,no_total_    = boolopt "no-total" rawopts'
     ,value_       = boolopt "value" rawopts'
     ,pretty_tables_ = boolopt "pretty-tables" rawopts'
+    ,color_       = color
     }
 
 -- | Do extra validation of raw option values, raising an error if there's a problem.
@@ -256,17 +265,32 @@
       | n == "yearly"    = Just $ Years 1
       | otherwise = Nothing
 
--- | Get the cleared status, if any, specified by the last of -C/--cleared,
--- --pending, -U/--uncleared options.
-clearedStatusFromRawOpts :: RawOpts -> Maybe ClearedStatus
-clearedStatusFromRawOpts = lastMay . catMaybes . map clearedstatusfromrawopt
+-- | Get any statuses to be matched, as specified by -U/--unmarked,
+-- -P/--pending, -C/--cleared flags. -UPC is equivalent to no flags,
+-- so this returns a list of 0-2 unique statuses.
+statusesFromRawOpts :: RawOpts -> [Status]
+statusesFromRawOpts = simplifyStatuses . catMaybes . map statusfromrawopt
   where
-    clearedstatusfromrawopt (n,_)
-      | n == "cleared"   = Just Cleared
+    statusfromrawopt (n,_)
+      | n == "unmarked"  = Just Unmarked
       | n == "pending"   = Just Pending
-      | n == "uncleared" = Just Uncleared
+      | n == "cleared"   = Just Cleared
       | otherwise        = Nothing
 
+-- | Reduce a list of statuses to just one of each status,
+-- and if all statuses are present return the empty list.
+simplifyStatuses l
+  | length l' >= numstatuses = []
+  | otherwise                = l'
+  where
+    l' = nub $ sort l 
+    numstatuses = length [minBound .. maxBound :: Status]
+
+-- | Add/remove this status from the status list. Used by hledger-ui.
+reportOptsToggleStatus s ropts@ReportOpts{statuses_=ss}
+  | s `elem` ss = ropts{statuses_=filter (/= s) ss}
+  | otherwise   = ropts{statuses_=simplifyStatuses (s:ss)}
+
 type DisplayExp = String
 
 maybedisplayopt :: Day -> RawOpts -> Maybe DisplayExp
@@ -313,7 +337,7 @@
               [(if date2_ then Date2 else Date) $ periodAsDateSpan period_]
               ++ (if real_ then [Real True] else [])
               ++ (if empty_ then [Empty True] else []) -- ?
-              ++ (maybe [] ((:[]) . Status) clearedstatus_)
+              ++ [Or $ map StatusQ statuses_]
               ++ (maybe [] ((:[]) . Depth) depth_)
     argsq = fst $ parseQuery d (T.pack query_)
 
@@ -325,7 +349,7 @@
               [(if date2_ then Date2 else Date) $ periodAsDateSpan period_]
               ++ (if real_ then [Real True] else [])
               ++ (if empty_ then [Empty True] else []) -- ?
-              ++ (maybe [] ((:[]) . Status) clearedstatus_)
+              ++ [Or $ map StatusQ statuses_]
               ++ (maybe [] ((:[]) . Depth) depth_)
 
 tests_queryFromOpts :: [Test]
diff --git a/Hledger/Utils.hs b/Hledger/Utils.hs
--- a/Hledger/Utils.hs
+++ b/Hledger/Utils.hs
@@ -24,6 +24,7 @@
                           module Hledger.Utils.String,
                           module Hledger.Utils.Text,
                           module Hledger.Utils.Test,
+                          module Hledger.Utils.Color,
                           module Hledger.Utils.Tree,
                           -- Debug.Trace.trace,
                           -- module Data.PPrint,
@@ -55,6 +56,7 @@
 import Hledger.Utils.String
 import Hledger.Utils.Text
 import Hledger.Utils.Test
+import Hledger.Utils.Color
 import Hledger.Utils.Tree
 -- import Prelude hiding (readFile,writeFile,appendFile,getContents,putStr,putStrLn)
 -- import Hledger.Utils.UTF8IOCompat   (readFile,writeFile,appendFile,getContents,putStr,putStrLn)
diff --git a/Hledger/Utils/Color.hs b/Hledger/Utils/Color.hs
new file mode 100644
--- /dev/null
+++ b/Hledger/Utils/Color.hs
@@ -0,0 +1,23 @@
+-- | Basic color helpers for prettifying console output.
+
+{-# LANGUAGE OverloadedStrings #-}
+
+module Hledger.Utils.Color 
+(
+  color,
+  bgColor,
+  Color(..),
+  ColorIntensity(..)
+)
+where
+
+import System.Console.ANSI
+
+
+-- | Wrap a string in ANSI codes to set and reset foreground colour.
+color :: ColorIntensity -> Color -> String -> String
+color int col s = setSGRCode [SetColor Foreground int col] ++ s ++ setSGRCode []
+
+-- | Wrap a string in ANSI codes to set and reset background colour.
+bgColor :: ColorIntensity -> Color -> String -> String
+bgColor int col s = setSGRCode [SetColor Background int col] ++ s ++ setSGRCode []
diff --git a/Hledger/Utils/Debug.hs b/Hledger/Utils/Debug.hs
--- a/Hledger/Utils/Debug.hs
+++ b/Hledger/Utils/Debug.hs
@@ -151,7 +151,7 @@
 dbg9IO = tracePrettyAtIO 9
 
 -- | Pretty-print a message and a showable value to the console if the debug level is at or above the specified level.
--- dbtAt 0 always prints. Otherwise, uses unsafePerformIO.
+-- At level 0, always prints. Otherwise, uses unsafePerformIO.
 tracePrettyAt :: Show a => Int -> String -> a -> a
 tracePrettyAt lvl = dbgppshow lvl
 
@@ -170,6 +170,25 @@
 
 tracePrettyAtIO :: (MonadIO m, Show a) => Int -> String -> a -> m ()
 tracePrettyAtIO lvl lbl x = liftIO $ tracePrettyAt lvl lbl x `seq` return ()
+
+log0 :: Show a => String -> a -> a
+log0 = logPrettyAt 0
+
+-- | Log a message and a pretty-printed showable value to ./debug.log, 
+-- if the debug level is at or above the specified level.
+-- At level 0, always logs. Otherwise, uses unsafePerformIO.
+logPrettyAt :: Show a => Int -> String -> a -> a
+logPrettyAt lvl
+    | lvl > 0 && debugLevel < lvl = flip const
+    | otherwise = \s a -> 
+        let p = ppShow a
+            ls = lines p
+            nlorspace | length ls > 1 = "\n"
+                      | otherwise     = " " ++ take (10 - length s) (repeat ' ')
+            ls' | length ls > 1 = map (" "++) ls
+                | otherwise     = ls
+            output = s++":"++nlorspace++intercalate "\n" ls'
+        in unsafePerformIO $ appendFile "debug.log" output >> return a
 
 -- | print this string to the console before evaluating the expression,
 -- if the global debug level is at or above the specified level.  Uses unsafePerformIO.
diff --git a/Hledger/Utils/String.hs b/Hledger/Utils/String.hs
--- a/Hledger/Utils/String.hs
+++ b/Hledger/Utils/String.hs
@@ -15,6 +15,7 @@
  escapeQuotes,
  words',
  unwords',
+ stripAnsi,
  -- * single-line layout
  strip,
  lstrip,
@@ -319,12 +320,17 @@
 -- from Pandoc (copyright John MacFarlane, GPL)
 -- see also http://unicode.org/reports/tr11/#Description
 
--- | Calculate the designated render width of a string, taking into
--- account wide characters and line breaks (the longest line within a
--- multi-line string determines the width ).
+-- | Calculate the render width of a string, considering
+-- wide characters (counted as double width), ANSI escape codes 
+-- (not counted), and line breaks (in a multi-line string, the longest
+-- line determines the width). 
 strWidth :: String -> Int
 strWidth "" = 0
-strWidth s = maximum $ map (foldr (\a b -> charWidth a + b) 0) $ lines s
+strWidth s = maximum $ map (foldr (\a b -> charWidth a + b) 0) $ lines s'
+  where s' = stripAnsi s
+
+stripAnsi :: String -> String
+stripAnsi = regexReplace "\ESC\\[([0-9]+;)*([0-9]+)?[ABCDHJKfmsu]" ""
 
 -- | Get the designated render width of a character: 0 for a combining
 -- character, 1 for a regular character, 2 for a wide character.
diff --git a/doc/hledger_csv.5 b/doc/hledger_csv.5
--- a/doc/hledger_csv.5
+++ b/doc/hledger_csv.5
@@ -1,5 +1,5 @@
 
-.TH "hledger_csv" "5" "March 2017" "hledger 1.2" "hledger User Manuals"
+.TH "hledger_csv" "5" "June 2017" "hledger 1.3" "hledger User Manuals"
 
 
 
@@ -18,7 +18,7 @@
 you\[aq]ll need to adjust.
 At minimum, the rules file must specify the \f[C]date\f[] and
 \f[C]amount\f[] fields.
-For an example, see How to read CSV files.
+For an example, see Cookbook: convert CSV files.
 .PP
 To learn about \f[I]exporting\f[] CSV, see CSV output.
 .SH CSV RULES
@@ -90,7 +90,7 @@
 \f[C]date\f[], \f[C]date2\f[], \f[C]status\f[], \f[C]code\f[],
 \f[C]description\f[], \f[C]comment\f[], \f[C]account1\f[],
 \f[C]account2\f[], \f[C]amount\f[], \f[C]amount\-in\f[],
-\f[C]amount\-out\f[], \f[C]currency\f[].
+\f[C]amount\-out\f[], \f[C]currency\f[], \f[C]balance\f[].
 Eg:
 .IP
 .nf
@@ -195,7 +195,7 @@
 include\ common.rules
 \f[]
 .fi
-.SH TIPS
+.SH CSV TIPS
 .PP
 Each generated journal entry will have two postings, to
 \f[C]account1\f[] and \f[C]account2\f[] respectively.
@@ -210,6 +210,11 @@
 \f[C]currency\f[] pseudo field which will be automatically prepended to
 the amount.
 (Or you can do the same thing with a field assignment.)
+.PP
+If the CSV includes a running balance, you can assign that to the
+\f[C]balance\f[] pseudo field to generate a balance assertion on
+\f[C]account1\f[] whenever the balance field is non\-empty.
+(Eg to double\-check your bank\[aq]s balance calculation.)
 .PP
 If an amount value is parenthesised, it will be de\-parenthesised and
 sign\-flipped automatically.
diff --git a/doc/hledger_csv.5.info b/doc/hledger_csv.5.info
--- a/doc/hledger_csv.5.info
+++ b/doc/hledger_csv.5.info
@@ -3,7 +3,7 @@
 
 File: hledger_csv.5.info,  Node: Top,  Next: CSV RULES,  Up: (dir)
 
-hledger_csv(5) hledger 1.2
+hledger_csv(5) hledger 1.3
 **************************
 
 hledger can read CSV files, converting each CSV record into a journal
@@ -13,16 +13,16 @@
 with '--rules-file PATH'.  hledger will create it if necessary, with
 some default rules which you'll need to adjust.  At minimum, the rules
 file must specify the 'date' and 'amount' fields.  For an example, see
-How to read CSV files.
+Cookbook: convert CSV files.
 
    To learn about _exporting_ CSV, see CSV output.
 * Menu:
 
 * CSV RULES::
-* TIPS::
+* CSV TIPS::
 
 
-File: hledger_csv.5.info,  Node: CSV RULES,  Next: TIPS,  Prev: Top,  Up: Top
+File: hledger_csv.5.info,  Node: CSV RULES,  Next: CSV TIPS,  Prev: Top,  Up: Top
 
 1 CSV RULES
 ***********
@@ -89,7 +89,8 @@
 whitespace; uninteresting names may be left blank), and (b) assigns them
 to journal entry fields if you use any of these standard field names:
 'date', 'date2', 'status', 'code', 'description', 'comment', 'account1',
-'account2', 'amount', 'amount-in', 'amount-out', 'currency'.  Eg:
+'account2', 'amount', 'amount-in', 'amount-out', 'currency', 'balance'.
+Eg:
 
 # use the 1st, 2nd and 4th CSV fields as the entry's date, description and amount,
 # and give the 7th and 8th fields meaningful names for later reference:
@@ -170,10 +171,10 @@
 include common.rules
 
 
-File: hledger_csv.5.info,  Node: TIPS,  Prev: CSV RULES,  Up: Top
+File: hledger_csv.5.info,  Node: CSV TIPS,  Prev: CSV RULES,  Up: Top
 
-2 TIPS
-******
+2 CSV TIPS
+**********
 
 Each generated journal entry will have two postings, to 'account1' and
 'account2' respectively.  Currently it's not possible to generate
@@ -186,6 +187,11 @@
 'currency' pseudo field which will be automatically prepended to the
 amount.  (Or you can do the same thing with a field assignment.)
 
+   If the CSV includes a running balance, you can assign that to the
+'balance' pseudo field to generate a balance assertion on 'account1'
+whenever the balance field is non-empty.  (Eg to double-check your
+bank's balance calculation.)
+
    If an amount value is parenthesised, it will be de-parenthesised and
 sign-flipped automatically.
 
@@ -195,21 +201,21 @@
 
 Tag Table:
 Node: Top74
-Node: CSV RULES800
-Ref: #csv-rules906
-Node: skip1149
-Ref: #skip1245
-Node: date-format1417
-Ref: #date-format1546
-Node: field list2052
-Ref: #field-list2191
-Node: field assignment2886
-Ref: #field-assignment3043
-Node: conditional block3547
-Ref: #conditional-block3703
-Node: include4599
-Ref: #include4710
-Node: TIPS4941
-Ref: #tips5025
+Node: CSV RULES810
+Ref: #csv-rules920
+Node: skip1163
+Ref: #skip1259
+Node: date-format1431
+Ref: #date-format1560
+Node: field list2066
+Ref: #field-list2205
+Node: field assignment2910
+Ref: #field-assignment3067
+Node: conditional block3571
+Ref: #conditional-block3727
+Node: include4623
+Ref: #include4734
+Node: CSV TIPS4965
+Ref: #csv-tips5061
 
 End Tag Table
diff --git a/doc/hledger_csv.5.txt b/doc/hledger_csv.5.txt
--- a/doc/hledger_csv.5.txt
+++ b/doc/hledger_csv.5.txt
@@ -13,8 +13,8 @@
        .rules suffix (eg: mybank.csv.rules); or, you can specify the file with
        --rules-file PATH.   hledger  will  create  it  if necessary, with some
        default rules which you'll need to adjust.  At minimum, the rules  file
-       must  specify  the  date and amount fields.  For an example, see How to
-       read CSV files.
+       must specify the date and amount fields.  For an example, see Cookbook:
+       convert CSV files.
 
        To learn about exporting CSV, see CSV output.
 
@@ -58,7 +58,7 @@
        space; uninteresting names may be left blank), and (b) assigns them  to
        journal  entry  fields  if  you  use any of these standard field names:
        date, date2, status, code, description,  comment,  account1,  account2,
-       amount, amount-in, amount-out, currency.  Eg:
+       amount, amount-in, amount-out, currency, balance.  Eg:
 
               # use the 1st, 2nd and 4th CSV fields as the entry's date, description and amount,
               # and give the 7th and 8th fields meaningful names for later reference:
@@ -123,7 +123,7 @@
               # rules reused with several CSV files
               include common.rules
 
-TIPS
+CSV TIPS
        Each generated journal entry will have two postings,  to  account1  and
        account2 respectively.  Currently it's not possible to generate entries
        with more than two postings.
@@ -135,16 +135,21 @@
        currency pseudo field which will  be  automatically  prepended  to  the
        amount.  (Or you can do the same thing with a field assignment.)
 
-       If  an  amount  value is parenthesised, it will be de-parenthesised and
+       If  the CSV includes a running balance, you can assign that to the bal-
+       ance pseudo field to generate a balance assertion on account1  whenever
+       the  balance  field is non-empty.  (Eg to double-check your bank's bal-
+       ance calculation.)
+
+       If an amount value is parenthesised, it will  be  de-parenthesised  and
        sign-flipped automatically.
 
-       The generated journal entries will be sorted  by  date.   The  original
+       The  generated  journal  entries  will be sorted by date.  The original
        order of same-day entries will be preserved, usually.
 
 
 
 REPORTING BUGS
-       Report  bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+       Report bugs at http://bugs.hledger.org (or on the #hledger IRC  channel
        or hledger mail list)
 
 
@@ -158,7 +163,7 @@
 
 
 SEE ALSO
-       hledger(1),     hledger-ui(1),     hledger-web(1),      hledger-api(1),
+       hledger(1),      hledger-ui(1),     hledger-web(1),     hledger-api(1),
        hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
        dot(5), ledger(1)
 
@@ -166,4 +171,4 @@
 
 
 
-hledger 1.2                       March 2017                    hledger_csv(5)
+hledger 1.3                        June 2017                    hledger_csv(5)
diff --git a/doc/hledger_journal.5 b/doc/hledger_journal.5
--- a/doc/hledger_journal.5
+++ b/doc/hledger_journal.5
@@ -1,6 +1,6 @@
 .\"t
 
-.TH "hledger_journal" "5" "March 2017" "hledger 1.2" "hledger User Manuals"
+.TH "hledger_journal" "5" "June 2017" "hledger 1.3" "hledger User Manuals"
 
 
 
@@ -61,34 +61,49 @@
 .SH FILE FORMAT
 .SS Transactions
 .PP
-Transactions are represented by journal entries.
-Each begins with a simple date in column 0, followed by three optional
-fields with spaces between them:
+Transactions are movements of some quantity of commodities between named
+accounts.
+Each transaction is represented by a journal entry beginning with a
+simple date in column 0.
+This can be followed by any of the following, separated by spaces:
 .IP \[bu] 2
-a status flag, which can be empty or \f[C]!\f[] or \f[C]*\f[] (meaning
-"uncleared", "pending" and "cleared", or whatever you want)
+(optional) a status character (empty, \f[C]!\f[], or \f[C]*\f[])
 .IP \[bu] 2
-a transaction code (eg a check number),
+(optional) a transaction code (any short number or text, enclosed in
+parentheses)
 .IP \[bu] 2
-and/or a description
+(optional) a transaction description (any remaining text until end of
+line)
 .PP
-then some number of postings, of some amount to some account.
-Each posting is on its own line, consisting of:
-.IP \[bu] 2
-indentation of one or more spaces (or tabs)
+Then comes zero or more (but usually at least 2) indented lines
+representing...
+.SS Postings
+.PP
+A posting is an addition of some amount to, or removal of some amount
+from, an account.
+Each posting line begins with at least one space or tab (2 or 4 spaces
+is common), followed by:
 .IP \[bu] 2
-optionally, a \f[C]!\f[] or \f[C]*\f[] status flag followed by a space
+(optional) a status character (empty, \f[C]!\f[], or \f[C]*\f[]),
+followed by a space
 .IP \[bu] 2
-an account name, optionally containing single spaces
+(required) an account name (any text, optionally containing \f[B]single
+spaces\f[], until end of line or a double space)
 .IP \[bu] 2
-optionally, two or more spaces or tabs followed by an amount
+(optional) \f[B]two or more spaces\f[] or tabs followed by an amount.
 .PP
-Usually there are two or more postings, though one or none is also
-possible.
-The posting amounts within a transaction must always balance, ie add up
-to 0.
-Optionally one amount can be left blank, in which case it will be
-inferred.
+Positive amounts are being added to the account, negative amounts are
+being removed.
+.PP
+The amounts within a transaction must always sum up to zero.
+As a convenience, one amount may be left blank; it will be inferred so
+as to balance the transaction.
+.PP
+Be sure to note the unusual two\-space delimiter between account name
+and amount.
+This makes it easy to write account names containing spaces.
+But if you accidentally leave only one space (or tab) before the amount,
+the amount will be considered part of the account name.
 .SS Dates
 .SS Simple dates
 .PP
@@ -195,6 +210,92 @@
 \f[C]0123456789/\-.=\f[] characters in this way.
 With this syntax, DATE infers its year from the transaction and DATE2
 infers its year from DATE.
+.SS Status
+.PP
+Transactions, or individual postings within a transaction, can have a
+status mark, which is a single character before the transaction
+description or posting account name, separated from it by a space,
+indicating one of three statuses:
+.PP
+.TS
+tab(@);
+l l.
+T{
+mark \ 
+T}@T{
+status
+T}
+_
+T{
+\ 
+T}@T{
+unmarked
+T}
+T{
+\f[C]!\f[]
+T}@T{
+pending
+T}
+T{
+\f[C]*\f[]
+T}@T{
+cleared
+T}
+.TE
+.PP
+When reporting, you can filter by status with the
+\f[C]\-U/\-\-unmarked\f[], \f[C]\-P/\-\-pending\f[], and
+\f[C]\-C/\-\-cleared\f[] flags; or the \f[C]status:\f[],
+\f[C]status:!\f[], and \f[C]status:*\f[] queries; or the U, P, C keys in
+hledger\-ui.
+.PP
+Note, in Ledger and in older versions of hledger, the "unmarked" state
+is called "uncleared".
+As of hledger 1.3 we have renamed it to unmarked for clarity.
+.PP
+To replicate Ledger and old hledger\[aq]s behaviour of also matching
+pending, combine \-U and \-P.
+.PP
+Status marks are optional, but can be helpful eg for reconciling with
+real\-world accounts.
+Some editor modes provide highlighting and shortcuts for working with
+status.
+Eg in Emacs ledger\-mode, you can toggle transaction status with C\-c
+C\-e, or posting status with C\-c C\-c.
+.PP
+What "uncleared", "pending", and "cleared" actually mean is up to you.
+Here\[aq]s one suggestion:
+.PP
+.TS
+tab(@);
+lw(10.5n) lw(59.5n).
+T{
+status
+T}@T{
+meaning
+T}
+_
+T{
+uncleared
+T}@T{
+recorded but not yet reconciled; needs review
+T}
+T{
+pending
+T}@T{
+tentatively reconciled (if needed, eg during a big reconciliation)
+T}
+T{
+cleared
+T}@T{
+complete, reconciled as far as possible, and considered correct
+T}
+.TE
+.PP
+With this scheme, you would use \f[C]\-PC\f[] to see the current balance
+at your bank, \f[C]\-U\f[] to see things which will probably hit your
+bank soon (like uncashed checks), and no flags to see the most
+up\-to\-date state of your finances.
 .SS Account names
 .PP
 Account names typically have several parts separated by a full colon,
@@ -470,78 +571,101 @@
 .SS Prices
 .SS Transaction prices
 .PP
-Within a transaction posting, you can record an amount\[aq]s price in
-another commodity.
-This can be used to document the cost (for a purchase), or selling price
-(for a sale), or the exchange rate that was used, for this transaction.
-These transaction prices are fixed, and do not change over time.
+Within a transaction, you can note an amount\[aq]s price in another
+commodity.
+This can be used to document the cost (in a purchase) or selling price
+(in a sale).
+For example, transaction prices are useful to record purchases of a
+foreign currency.
 .PP
-Amounts with transaction prices can be displayed in the transaction
-price\[aq]s commodity, by using the \f[C]\-\-cost/\-B\f[] flag supported
-by most hledger commands (mnemonic: "cost Basis").
+Transaction prices are fixed, and do not change over time.
+(Ledger users: Ledger uses a different syntax for fixed prices,
+\f[C]{=UNITPRICE}\f[], which hledger currently ignores).
 .PP
 There are several ways to record a transaction price:
 .IP "1." 3
-Write the unit price (aka exchange rate), as \f[C]\@\ UNITPRICE\f[]
-after the amount:
+Write the price per unit, as \f[C]\@\ UNITPRICE\f[] after the amount:
 .RS 4
 .IP
 .nf
 \f[C]
 2009/1/1
-\ \ assets:foreign\ currency\ \ \ €100\ \@\ $1.35\ \ ;\ one\ hundred\ euros\ at\ $1.35\ each
-\ \ assets:cash
+\ \ assets:euros\ \ \ \ \ €100\ \@\ $1.35\ \ ;\ one\ hundred\ euros\ purchased\ at\ $1.35\ each
+\ \ assets:dollars\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ;\ balancing\ amount\ is\ \-$135.00
 \f[]
 .fi
 .RE
 .IP "2." 3
-Or write the total price, as \f[C]\@\@\ TOTALPRICE\f[] after the amount:
+Write the total price, as \f[C]\@\@\ TOTALPRICE\f[] after the amount:
 .RS 4
 .IP
 .nf
 \f[C]
 2009/1/1
-\ \ assets:foreign\ currency\ \ \ €100\ \@\@\ $135\ \ ;\ one\ hundred\ euros\ at\ $135\ for\ the\ lot
-\ \ assets:cash
+\ \ assets:euros\ \ \ \ \ €100\ \@\@\ $135\ \ ;\ one\ hundred\ euros\ purchased\ at\ $135\ for\ the\ lot
+\ \ assets:dollars
 \f[]
 .fi
 .RE
 .IP "3." 3
-Or let hledger infer the price so as to balance the transaction.
-To permit this, you must fully specify all posting amounts, and their
-sum must have a non\-zero amount in exactly two commodities:
+Specify amounts for all postings, using exactly two commodities, and let
+hledger infer the price that balances the transaction:
 .RS 4
 .IP
 .nf
 \f[C]
 2009/1/1
-\ \ assets:foreign\ currency\ \ \ €100\ \ \ \ \ \ \ \ \ \ ;\ one\ hundred\ euros
-\ \ assets:cash\ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-135\ \ \ \ \ \ \ \ \ \ ;\ exchanged\ for\ $135
+\ \ assets:euros\ \ \ \ \ €100\ \ \ \ \ \ \ \ \ \ ;\ one\ hundred\ euros\ purchased
+\ \ assets:dollars\ \ $\-135\ \ \ \ \ \ \ \ \ \ ;\ for\ $135
 \f[]
 .fi
 .RE
 .PP
-With any of the above examples we get:
+Amounts with transaction prices can be displayed in the transaction
+price\[aq]s commodity by using the \f[C]\-B/\-\-cost\f[] flag (except
+for #551) ("B" is from "cost Basis").
+Eg for the above, here is how \-B affects the balance report:
 .IP
 .nf
 \f[C]
-$\ hledger\ print\ \-B
-2009/01/01
-\ \ \ \ assets:foreign\ currency\ \ \ \ \ \ \ $135.00
-\ \ \ \ assets:cash\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-135.00
+$\ hledger\ bal\ \-N\ \-\-flat
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-135\ \ assets:dollars
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ €100\ \ assets:euros
+$\ hledger\ bal\ \-N\ \-\-flat\ \-B
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-135\ \ assets:dollars
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $135\ \ assets:euros\ \ \ \ #\ <\-\ the\ euros\[aq]\ cost
 \f[]
 .fi
 .PP
-Example use for transaction prices: recording the effective conversion
-rate of purchases made in a foreign currency.
+Note \-B is sensitive to the order of postings when a transaction price
+is inferred: the inferred price will be in the commodity of the last
+amount.
+So if example 3\[aq]s postings are reversed, while the transaction is
+equivalent, \-B shows something different:
+.IP
+.nf
+\f[C]
+2009/1/1
+\ \ assets:dollars\ \ $\-135\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ;\ 135\ dollars\ sold
+\ \ assets:euros\ \ \ \ \ €100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ;\ for\ 100\ euros
+\f[]
+.fi
+.IP
+.nf
+\f[C]
+$\ hledger\ bal\ \-N\ \-\-flat\ \-B
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ €\-100\ \ assets:dollars\ \ #\ <\-\ the\ dollars\[aq]\ selling\ price
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ €100\ \ assets:euros
+\f[]
+.fi
 .SS Market prices
 .PP
 Market prices are not tied to a particular transaction; they represent
 historical exchange rates between two commodities.
 (Ledger calls them historical prices.) For example, the prices published
 by a stock exchange or the foreign exchange market.
-Some commands (balance, currently) can use this information to show the
-market value of things at a given date.
+hledger can use these prices to show the market value of things at a
+given date, see market value.
 .PP
 To record market prices, use P directives in the main journal or in an
 included file.
@@ -739,8 +863,7 @@
 .SS Regex aliases
 .PP
 There is also a more powerful variant that uses a regular expression,
-indicated by the forward slashes.
-(This was the default behaviour in hledger 0.24\-0.25):
+indicated by the forward slashes:
 .IP
 .nf
 \f[C]
diff --git a/doc/hledger_journal.5.info b/doc/hledger_journal.5.info
--- a/doc/hledger_journal.5.info
+++ b/doc/hledger_journal.5.info
@@ -4,7 +4,7 @@
 
 File: hledger_journal.5.info,  Node: Top,  Next: FILE FORMAT,  Up: (dir)
 
-hledger_journal(5) hledger 1.2
+hledger_journal(5) hledger 1.3
 ******************************
 
 hledger's usual data source is a plain text file containing journal
@@ -64,7 +64,9 @@
 * Menu:
 
 * Transactions::
+* Postings::
 * Dates::
+* Status::
 * Account names::
 * Amounts::
 * Virtual Postings::
@@ -76,37 +78,57 @@
 * Directives::
 
 
-File: hledger_journal.5.info,  Node: Transactions,  Next: Dates,  Up: FILE FORMAT
+File: hledger_journal.5.info,  Node: Transactions,  Next: Postings,  Up: FILE FORMAT
 
 1.1 Transactions
 ================
 
-Transactions are represented by journal entries.  Each begins with a
-simple date in column 0, followed by three optional fields with spaces
-between them:
+Transactions are movements of some quantity of commodities between named
+accounts.  Each transaction is represented by a journal entry beginning
+with a simple date in column 0.  This can be followed by any of the
+following, separated by spaces:
 
-   * a status flag, which can be empty or '!' or '*' (meaning
-     "uncleared", "pending" and "cleared", or whatever you want)
-   * a transaction code (eg a check number),
-   * and/or a description
+   * (optional) a status character (empty, '!', or '*')
+   * (optional) a transaction code (any short number or text, enclosed
+     in parentheses)
+   * (optional) a transaction description (any remaining text until end
+     of line)
 
-   then some number of postings, of some amount to some account.  Each
-posting is on its own line, consisting of:
+   Then comes zero or more (but usually at least 2) indented lines
+representing...
 
-   * indentation of one or more spaces (or tabs)
-   * optionally, a '!' or '*' status flag followed by a space
-   * an account name, optionally containing single spaces
-   * optionally, two or more spaces or tabs followed by an amount
+
+File: hledger_journal.5.info,  Node: Postings,  Next: Dates,  Prev: Transactions,  Up: FILE FORMAT
 
-   Usually there are two or more postings, though one or none is also
-possible.  The posting amounts within a transaction must always balance,
-ie add up to 0.  Optionally one amount can be left blank, in which case
-it will be inferred.
+1.2 Postings
+============
 
+A posting is an addition of some amount to, or removal of some amount
+from, an account.  Each posting line begins with at least one space or
+tab (2 or 4 spaces is common), followed by:
+
+   * (optional) a status character (empty, '!', or '*'), followed by a
+     space
+   * (required) an account name (any text, optionally containing *single
+     spaces*, until end of line or a double space)
+   * (optional) *two or more spaces* or tabs followed by an amount.
+
+   Positive amounts are being added to the account, negative amounts are
+being removed.
+
+   The amounts within a transaction must always sum up to zero.  As a
+convenience, one amount may be left blank; it will be inferred so as to
+balance the transaction.
+
+   Be sure to note the unusual two-space delimiter between account name
+and amount.  This makes it easy to write account names containing
+spaces.  But if you accidentally leave only one space (or tab) before
+the amount, the amount will be considered part of the account name.
+
 
-File: hledger_journal.5.info,  Node: Dates,  Next: Account names,  Prev: Transactions,  Up: FILE FORMAT
+File: hledger_journal.5.info,  Node: Dates,  Next: Status,  Prev: Postings,  Up: FILE FORMAT
 
-1.2 Dates
+1.3 Dates
 =========
 
 * Menu:
@@ -118,7 +140,7 @@
 
 File: hledger_journal.5.info,  Node: Simple dates,  Next: Secondary dates,  Up: Dates
 
-1.2.1 Simple dates
+1.3.1 Simple dates
 ------------------
 
 Within a journal file, transaction dates use Y/M/D (or Y-M-D or Y.M.D)
@@ -131,7 +153,7 @@
 
 File: hledger_journal.5.info,  Node: Secondary dates,  Next: Posting dates,  Prev: Simple dates,  Up: Dates
 
-1.2.2 Secondary dates
+1.3.2 Secondary dates
 ---------------------
 
 Real-life transactions sometimes involve more than one date - eg the
@@ -172,7 +194,7 @@
 
 File: hledger_journal.5.info,  Node: Posting dates,  Prev: Secondary dates,  Up: Dates
 
-1.2.3 Posting dates
+1.3.3 Posting dates
 -------------------
 
 You can give individual postings a different date from their parent
@@ -205,9 +227,59 @@
 transaction and DATE2 infers its year from DATE.
 
 
-File: hledger_journal.5.info,  Node: Account names,  Next: Amounts,  Prev: Dates,  Up: FILE FORMAT
+File: hledger_journal.5.info,  Node: Status,  Next: Account names,  Prev: Dates,  Up: FILE FORMAT
 
-1.3 Account names
+1.4 Status
+==========
+
+Transactions, or individual postings within a transaction, can have a
+status mark, which is a single character before the transaction
+description or posting account name, separated from it by a space,
+indicating one of three statuses:
+
+mark  status
+ 
+-----------------
+      unmarked
+'!'   pending
+'*'   cleared
+
+   When reporting, you can filter by status with the '-U/--unmarked',
+'-P/--pending', and '-C/--cleared' flags; or the 'status:', 'status:!',
+and 'status:*' queries; or the U, P, C keys in hledger-ui.
+
+   Note, in Ledger and in older versions of hledger, the "unmarked"
+state is called "uncleared".  As of hledger 1.3 we have renamed it to
+unmarked for clarity.
+
+   To replicate Ledger and old hledger's behaviour of also matching
+pending, combine -U and -P.
+
+   Status marks are optional, but can be helpful eg for reconciling with
+real-world accounts.  Some editor modes provide highlighting and
+shortcuts for working with status.  Eg in Emacs ledger-mode, you can
+toggle transaction status with C-c C-e, or posting status with C-c C-c.
+
+   What "uncleared", "pending", and "cleared" actually mean is up to
+you.  Here's one suggestion:
+
+status      meaning
+--------------------------------------------------------------------------
+uncleared   recorded but not yet reconciled; needs review
+pending     tentatively reconciled (if needed, eg during a big
+            reconciliation)
+cleared     complete, reconciled as far as possible, and considered
+            correct
+
+   With this scheme, you would use '-PC' to see the current balance at
+your bank, '-U' to see things which will probably hit your bank soon
+(like uncashed checks), and no flags to see the most up-to-date state of
+your finances.
+
+
+File: hledger_journal.5.info,  Node: Account names,  Next: Amounts,  Prev: Status,  Up: FILE FORMAT
+
+1.5 Account names
 =================
 
 Account names typically have several parts separated by a full colon,
@@ -225,7 +297,7 @@
 
 File: hledger_journal.5.info,  Node: Amounts,  Next: Virtual Postings,  Prev: Account names,  Up: FILE FORMAT
 
-1.4 Amounts
+1.6 Amounts
 ===========
 
 After the account name, there is usually an amount.  Important: between
@@ -280,7 +352,7 @@
 
 File: hledger_journal.5.info,  Node: Virtual Postings,  Next: Balance Assertions,  Prev: Amounts,  Up: FILE FORMAT
 
-1.5 Virtual Postings
+1.7 Virtual Postings
 ====================
 
 When you parenthesise the account name in a posting, we call that a
@@ -315,7 +387,7 @@
 
 File: hledger_journal.5.info,  Node: Balance Assertions,  Next: Balance Assignments,  Prev: Virtual Postings,  Up: FILE FORMAT
 
-1.6 Balance Assertions
+1.8 Balance Assertions
 ======================
 
 hledger supports Ledger-style balance assertions in journal files.
@@ -349,7 +421,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and ordering,  Next: Assertions and included files,  Up: Balance Assertions
 
-1.6.1 Assertions and ordering
+1.8.1 Assertions and ordering
 -----------------------------
 
 hledger sorts an account's postings and assertions first by date and
@@ -368,7 +440,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and included files,  Next: Assertions and multiple -f options,  Prev: Assertions and ordering,  Up: Balance Assertions
 
-1.6.2 Assertions and included files
+1.8.2 Assertions and included files
 -----------------------------------
 
 With included files, things are a little more complicated.  Including
@@ -380,7 +452,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and multiple -f options,  Next: Assertions and commodities,  Prev: Assertions and included files,  Up: Balance Assertions
 
-1.6.3 Assertions and multiple -f options
+1.8.3 Assertions and multiple -f options
 ----------------------------------------
 
 Balance assertions don't work well across files specified with multiple
@@ -389,7 +461,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and commodities,  Next: Assertions and subaccounts,  Prev: Assertions and multiple -f options,  Up: Balance Assertions
 
-1.6.4 Assertions and commodities
+1.8.4 Assertions and commodities
 --------------------------------
 
 The asserted balance must be a simple single-commodity amount, and in
@@ -408,7 +480,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and subaccounts,  Next: Assertions and virtual postings,  Prev: Assertions and commodities,  Up: Balance Assertions
 
-1.6.5 Assertions and subaccounts
+1.8.5 Assertions and subaccounts
 --------------------------------
 
 Balance assertions do not count the balance from subaccounts; they check
@@ -431,7 +503,7 @@
 
 File: hledger_journal.5.info,  Node: Assertions and virtual postings,  Prev: Assertions and subaccounts,  Up: Balance Assertions
 
-1.6.6 Assertions and virtual postings
+1.8.6 Assertions and virtual postings
 -------------------------------------
 
 Balance assertions are checked against all postings, both real and
@@ -441,7 +513,7 @@
 
 File: hledger_journal.5.info,  Node: Balance Assignments,  Next: Prices,  Prev: Balance Assertions,  Up: FILE FORMAT
 
-1.7 Balance Assignments
+1.9 Balance Assignments
 =======================
 
 Ledger-style balance assignments are also supported.  These are like
@@ -474,8 +546,8 @@
 
 File: hledger_journal.5.info,  Node: Prices,  Next: Comments,  Prev: Balance Assignments,  Up: FILE FORMAT
 
-1.8 Prices
-==========
+1.10 Prices
+===========
 
 * Menu:
 
@@ -485,64 +557,75 @@
 
 File: hledger_journal.5.info,  Node: Transaction prices,  Next: Market prices,  Up: Prices
 
-1.8.1 Transaction prices
-------------------------
+1.10.1 Transaction prices
+-------------------------
 
-Within a transaction posting, you can record an amount's price in
-another commodity.  This can be used to document the cost (for a
-purchase), or selling price (for a sale), or the exchange rate that was
-used, for this transaction.  These transaction prices are fixed, and do
-not change over time.
+Within a transaction, you can note an amount's price in another
+commodity.  This can be used to document the cost (in a purchase) or
+selling price (in a sale).  For example, transaction prices are useful
+to record purchases of a foreign currency.
 
-   Amounts with transaction prices can be displayed in the transaction
-price's commodity, by using the '--cost/-B' flag supported by most
-hledger commands (mnemonic: "cost Basis").
+   Transaction prices are fixed, and do not change over time.  (Ledger
+users: Ledger uses a different syntax for fixed prices, '{=UNITPRICE}',
+which hledger currently ignores).
 
    There are several ways to record a transaction price:
 
-  1. Write the unit price (aka exchange rate), as '@ UNITPRICE' after
-     the amount:
+  1. Write the price per unit, as '@ UNITPRICE' after the amount:
 
      2009/1/1
-       assets:foreign currency   €100 @ $1.35  ; one hundred euros at $1.35 each
-       assets:cash
+       assets:euros     €100 @ $1.35  ; one hundred euros purchased at $1.35 each
+       assets:dollars                 ; balancing amount is -$135.00
 
-  2. Or write the total price, as '@@ TOTALPRICE' after the amount:
+  2. Write the total price, as '@@ TOTALPRICE' after the amount:
 
      2009/1/1
-       assets:foreign currency   €100 @@ $135  ; one hundred euros at $135 for the lot
-       assets:cash
+       assets:euros     €100 @@ $135  ; one hundred euros purchased at $135 for the lot
+       assets:dollars
 
-  3. Or let hledger infer the price so as to balance the transaction.
-     To permit this, you must fully specify all posting amounts, and
-     their sum must have a non-zero amount in exactly two commodities:
+  3. Specify amounts for all postings, using exactly two commodities,
+     and let hledger infer the price that balances the transaction:
 
      2009/1/1
-       assets:foreign currency   €100          ; one hundred euros
-       assets:cash              $-135          ; exchanged for $135
+       assets:euros     €100          ; one hundred euros purchased
+       assets:dollars  $-135          ; for $135
 
-   With any of the above examples we get:
+   Amounts with transaction prices can be displayed in the transaction
+price's commodity by using the '-B/--cost' flag (except for #551) ("B"
+is from "cost Basis").  Eg for the above, here is how -B affects the
+balance report:
 
-$ hledger print -B
-2009/01/01
-    assets:foreign currency       $135.00
-    assets:cash                  $-135.00
+$ hledger bal -N --flat
+               $-135  assets:dollars
+                €100  assets:euros
+$ hledger bal -N --flat -B
+               $-135  assets:dollars
+                $135  assets:euros    # <- the euros' cost
 
-   Example use for transaction prices: recording the effective
-conversion rate of purchases made in a foreign currency.
+   Note -B is sensitive to the order of postings when a transaction
+price is inferred: the inferred price will be in the commodity of the
+last amount.  So if example 3's postings are reversed, while the
+transaction is equivalent, -B shows something different:
 
+2009/1/1
+  assets:dollars  $-135               ; 135 dollars sold
+  assets:euros     €100               ; for 100 euros
+
+$ hledger bal -N --flat -B
+               €-100  assets:dollars  # <- the dollars' selling price
+                €100  assets:euros
+
 
 File: hledger_journal.5.info,  Node: Market prices,  Prev: Transaction prices,  Up: Prices
 
-1.8.2 Market prices
--------------------
+1.10.2 Market prices
+--------------------
 
 Market prices are not tied to a particular transaction; they represent
 historical exchange rates between two commodities.  (Ledger calls them
 historical prices.)  For example, the prices published by a stock
-exchange or the foreign exchange market.  Some commands (balance,
-currently) can use this information to show the market value of things
-at a given date.
+exchange or the foreign exchange market.  hledger can use these prices
+to show the market value of things at a given date, see market value.
 
    To record market prices, use P directives in the main journal or in
 an included file.  Their format is:
@@ -564,8 +647,8 @@
 
 File: hledger_journal.5.info,  Node: Comments,  Next: Tags,  Prev: Prices,  Up: FILE FORMAT
 
-1.9 Comments
-============
+1.11 Comments
+=============
 
 Lines in the journal beginning with a semicolon (';') or hash ('#') or
 asterisk ('*') are comments, and will be ignored.  (Asterisk comments
@@ -604,7 +687,7 @@
 
 File: hledger_journal.5.info,  Node: Tags,  Next: Directives,  Prev: Comments,  Up: FILE FORMAT
 
-1.10 Tags
+1.12 Tags
 =========
 
 Tags are a way to add extra labels or labelled data to postings and
@@ -650,7 +733,7 @@
 
 File: hledger_journal.5.info,  Node: Implicit tags,  Up: Tags
 
-1.10.1 Implicit tags
+1.12.1 Implicit tags
 --------------------
 
 Some predefined "implicit" tags are also provided:
@@ -668,7 +751,7 @@
 
 File: hledger_journal.5.info,  Node: Directives,  Prev: Tags,  Up: FILE FORMAT
 
-1.11 Directives
+1.13 Directives
 ===============
 
 * Menu:
@@ -685,7 +768,7 @@
 
 File: hledger_journal.5.info,  Node: Account aliases,  Next: account directive,  Up: Directives
 
-1.11.1 Account aliases
+1.13.1 Account aliases
 ----------------------
 
 You can define aliases which rewrite your account names (after reading
@@ -710,7 +793,7 @@
 
 File: hledger_journal.5.info,  Node: Basic aliases,  Next: Regex aliases,  Up: Account aliases
 
-1.11.1.1 Basic aliases
+1.13.1.1 Basic aliases
 ......................
 
 To set an account alias, use the 'alias' directive in your journal file.
@@ -733,12 +816,11 @@
 
 File: hledger_journal.5.info,  Node: Regex aliases,  Next: Multiple aliases,  Prev: Basic aliases,  Up: Account aliases
 
-1.11.1.2 Regex aliases
+1.13.1.2 Regex aliases
 ......................
 
 There is also a more powerful variant that uses a regular expression,
-indicated by the forward slashes.  (This was the default behaviour in
-hledger 0.24-0.25):
+indicated by the forward slashes:
 
 alias /REGEX/ = REPLACEMENT
 
@@ -757,7 +839,7 @@
 
 File: hledger_journal.5.info,  Node: Multiple aliases,  Next: end aliases,  Prev: Regex aliases,  Up: Account aliases
 
-1.11.1.3 Multiple aliases
+1.13.1.3 Multiple aliases
 .........................
 
 You can define as many aliases as you like using directives or
@@ -773,7 +855,7 @@
 
 File: hledger_journal.5.info,  Node: end aliases,  Prev: Multiple aliases,  Up: Account aliases
 
-1.11.1.4 end aliases
+1.13.1.4 end aliases
 ....................
 
 You can clear (forget) all currently defined aliases with the 'end
@@ -784,7 +866,7 @@
 
 File: hledger_journal.5.info,  Node: account directive,  Next: apply account directive,  Prev: Account aliases,  Up: Directives
 
-1.11.2 account directive
+1.13.2 account directive
 ------------------------
 
 The 'account' directive predefines account names, as in Ledger and
@@ -805,7 +887,7 @@
 
 File: hledger_journal.5.info,  Node: apply account directive,  Next: Multi-line comments,  Prev: account directive,  Up: Directives
 
-1.11.3 apply account directive
+1.13.3 apply account directive
 ------------------------------
 
 You can specify a parent account which will be prepended to all accounts
@@ -841,7 +923,7 @@
 
 File: hledger_journal.5.info,  Node: Multi-line comments,  Next: commodity directive,  Prev: apply account directive,  Up: Directives
 
-1.11.4 Multi-line comments
+1.13.4 Multi-line comments
 --------------------------
 
 A line containing just 'comment' starts a multi-line comment, and a line
@@ -850,7 +932,7 @@
 
 File: hledger_journal.5.info,  Node: commodity directive,  Next: Default commodity,  Prev: Multi-line comments,  Up: Directives
 
-1.11.5 commodity directive
+1.13.5 commodity directive
 --------------------------
 
 The 'commodity' directive predefines commodities (currently this is just
@@ -882,7 +964,7 @@
 
 File: hledger_journal.5.info,  Node: Default commodity,  Next: Default year,  Prev: commodity directive,  Up: Directives
 
-1.11.6 Default commodity
+1.13.6 Default commodity
 ------------------------
 
 The D directive sets a default commodity (and display format), to be
@@ -902,7 +984,7 @@
 
 File: hledger_journal.5.info,  Node: Default year,  Next: Including other files,  Prev: Default commodity,  Up: Directives
 
-1.11.7 Default year
+1.13.7 Default year
 -------------------
 
 You can set a default year to be used for subsequent dates which don't
@@ -928,7 +1010,7 @@
 
 File: hledger_journal.5.info,  Node: Including other files,  Prev: Default year,  Up: Directives
 
-1.11.8 Including other files
+1.13.8 Including other files
 ----------------------------
 
 You can pull in the content of additional journal files by writing an
@@ -967,77 +1049,81 @@
 Node: Top78
 Node: FILE FORMAT2292
 Ref: #file-format2418
-Node: Transactions2601
-Ref: #transactions2721
-Node: Dates3663
-Ref: #dates3791
-Node: Simple dates3856
-Ref: #simple-dates3984
-Node: Secondary dates4350
-Ref: #secondary-dates4506
-Node: Posting dates6069
-Ref: #posting-dates6200
-Node: Account names7574
-Ref: #account-names7713
-Node: Amounts8200
-Ref: #amounts8338
-Node: Virtual Postings10439
-Ref: #virtual-postings10600
-Node: Balance Assertions11820
-Ref: #balance-assertions11997
-Node: Assertions and ordering12893
-Ref: #assertions-and-ordering13081
-Node: Assertions and included files13781
-Ref: #assertions-and-included-files14024
-Node: Assertions and multiple -f options14357
-Ref: #assertions-and-multiple--f-options14613
-Node: Assertions and commodities14745
-Ref: #assertions-and-commodities14982
-Node: Assertions and subaccounts15678
-Ref: #assertions-and-subaccounts15912
-Node: Assertions and virtual postings16433
-Ref: #assertions-and-virtual-postings16642
-Node: Balance Assignments16784
-Ref: #balance-assignments16953
-Node: Prices18072
-Ref: #prices18205
-Node: Transaction prices18256
-Ref: #transaction-prices18401
-Node: Market prices19978
-Ref: #market-prices20113
-Node: Comments21086
-Ref: #comments21208
-Node: Tags22321
-Ref: #tags22441
-Node: Implicit tags23870
-Ref: #implicit-tags23978
-Node: Directives24495
-Ref: #directives24610
-Node: Account aliases24803
-Ref: #account-aliases24949
-Node: Basic aliases25553
-Ref: #basic-aliases25698
-Node: Regex aliases26388
-Ref: #regex-aliases26558
-Node: Multiple aliases27329
-Ref: #multiple-aliases27503
-Node: end aliases28001
-Ref: #end-aliases28143
-Node: account directive28244
-Ref: #account-directive28426
-Node: apply account directive28722
-Ref: #apply-account-directive28920
-Node: Multi-line comments29579
-Ref: #multi-line-comments29771
-Node: commodity directive29899
-Ref: #commodity-directive30085
-Node: Default commodity30957
-Ref: #default-commodity31132
-Node: Default year31669
-Ref: #default-year31836
-Node: Including other files32259
-Ref: #including-other-files32418
-Node: EDITOR SUPPORT32815
-Ref: #editor-support32935
+Node: Transactions2625
+Ref: #transactions2748
+Node: Postings3313
+Ref: #postings3442
+Node: Dates4437
+Ref: #dates4554
+Node: Simple dates4619
+Ref: #simple-dates4747
+Node: Secondary dates5113
+Ref: #secondary-dates5269
+Node: Posting dates6832
+Ref: #posting-dates6963
+Node: Status8337
+Ref: #status8461
+Node: Account names10175
+Ref: #account-names10315
+Node: Amounts10802
+Ref: #amounts10940
+Node: Virtual Postings13041
+Ref: #virtual-postings13202
+Node: Balance Assertions14422
+Ref: #balance-assertions14599
+Node: Assertions and ordering15495
+Ref: #assertions-and-ordering15683
+Node: Assertions and included files16383
+Ref: #assertions-and-included-files16626
+Node: Assertions and multiple -f options16959
+Ref: #assertions-and-multiple--f-options17215
+Node: Assertions and commodities17347
+Ref: #assertions-and-commodities17584
+Node: Assertions and subaccounts18280
+Ref: #assertions-and-subaccounts18514
+Node: Assertions and virtual postings19035
+Ref: #assertions-and-virtual-postings19244
+Node: Balance Assignments19386
+Ref: #balance-assignments19555
+Node: Prices20674
+Ref: #prices20809
+Node: Transaction prices20860
+Ref: #transaction-prices21007
+Node: Market prices23163
+Ref: #market-prices23300
+Node: Comments24260
+Ref: #comments24384
+Node: Tags25497
+Ref: #tags25617
+Node: Implicit tags27046
+Ref: #implicit-tags27154
+Node: Directives27671
+Ref: #directives27786
+Node: Account aliases27979
+Ref: #account-aliases28125
+Node: Basic aliases28729
+Ref: #basic-aliases28874
+Node: Regex aliases29564
+Ref: #regex-aliases29734
+Node: Multiple aliases30449
+Ref: #multiple-aliases30623
+Node: end aliases31121
+Ref: #end-aliases31263
+Node: account directive31364
+Ref: #account-directive31546
+Node: apply account directive31842
+Ref: #apply-account-directive32040
+Node: Multi-line comments32699
+Ref: #multi-line-comments32891
+Node: commodity directive33019
+Ref: #commodity-directive33205
+Node: Default commodity34077
+Ref: #default-commodity34252
+Node: Default year34789
+Ref: #default-year34956
+Node: Including other files35379
+Ref: #including-other-files35538
+Node: EDITOR SUPPORT35935
+Ref: #editor-support36055
 
 End Tag Table
diff --git a/doc/hledger_journal.5.txt b/doc/hledger_journal.5.txt
--- a/doc/hledger_journal.5.txt
+++ b/doc/hledger_journal.5.txt
@@ -53,33 +53,46 @@
 
 FILE FORMAT
    Transactions
-       Transactions  are  represented  by journal entries.  Each begins with a
-       simple date in column 0, followed by three optional fields with  spaces
-       between them:
+       Transactions  are  movements  of  some  quantity of commodities between
+       named accounts.  Each transaction is represented  by  a  journal  entry
+       beginning  with a simple date in column 0.  This can be followed by any
+       of the following, separated by spaces:
 
-       o a  status  flag,  which  can be empty or ! or * (meaning "uncleared",
-         "pending" and "cleared", or whatever you want)
+       o (optional) a status character (empty, !, or *)
 
-       o a transaction code (eg a check number),
+       o (optional) a transaction code (any short number or text, enclosed  in
+         parentheses)
 
-       o and/or a description
+       o (optional) a transaction description (any remaining text until end of
+         line)
 
-       then some number of postings, of some amount  to  some  account.   Each
-       posting is on its own line, consisting of:
+       Then comes zero or more (but usually at least 2) indented lines  repre-
+       senting...
 
-       o indentation of one or more spaces (or tabs)
+   Postings
+       A  posting  is an addition of some amount to, or removal of some amount
+       from, an account.  Each posting line begins with at least one space  or
+       tab (2 or 4 spaces is common), followed by:
 
-       o optionally, a ! or * status flag followed by a space
+       o (optional) a status character (empty, !, or *), followed by a space
 
-       o an account name, optionally containing single spaces
+       o (required)  an  account  name (any text, optionally containing single
+         spaces, until end of line or a double space)
 
-       o optionally, two or more spaces or tabs followed by an amount
+       o (optional) two or more spaces or tabs followed by an amount.
 
-       Usually there are two or more postings, though one or none is also pos-
-       sible.  The posting amounts within a transaction must  always  balance,
-       ie add up to 0.  Optionally one amount can be left blank, in which case
-       it will be inferred.
+       Positive amounts are being added to the account, negative  amounts  are
+       being removed.
 
+       The amounts within a transaction must always sum up to zero.  As a con-
+       venience, one amount may be left blank; it will be inferred  so  as  to
+       balance the transaction.
+
+       Be  sure  to  note the unusual two-space delimiter between account name
+       and amount.  This makes it easy to write account names containing  spa-
+       ces.   But if you accidentally leave only one space (or tab) before the
+       amount, the amount will be considered part of the account name.
+
    Dates
    Simple dates
        Within a journal file, transaction dates use Y/M/D (or Y-M-D or  Y.M.D)
@@ -155,14 +168,60 @@
        With this syntax, DATE infers its year from the transaction  and  DATE2
        infers its year from DATE.
 
+   Status
+       Transactions,  or  individual postings within a transaction, can have a
+       status mark,  which  is  a  single  character  before  the  transaction
+       description  or  posting  account  name,  separated from it by a space,
+       indicating one of three statuses:
+
+
+       mark     status
+       ------------------
+                unmarked
+       !        pending
+       *        cleared
+
+       When reporting, you  can  filter  by  status  with  the  -U/--unmarked,
+       -P/--pending,  and  -C/--cleared  flags;  or the status:, status:!, and
+       status:* queries; or the U, P, C keys in hledger-ui.
+
+       Note, in Ledger and in older versions of hledger, the "unmarked"  state
+       is  called  "uncleared".   As  of  hledger  1.3  we  have renamed it to
+       unmarked for clarity.
+
+       To replicate Ledger and old hledger's behaviour of also matching  pend-
+       ing, combine -U and -P.
+
+       Status  marks  are optional, but can be helpful eg for reconciling with
+       real-world accounts.  Some editor modes provide highlighting and short-
+       cuts  for working with status.  Eg in Emacs ledger-mode, you can toggle
+       transaction status with C-c C-e, or posting status with C-c C-c.
+
+       What "uncleared", "pending", and "cleared" actually mean is up to  you.
+       Here's one suggestion:
+
+
+       status       meaning
+       --------------------------------------------------------------------------
+       uncleared    recorded but not yet reconciled; needs review
+       pending      tentatively  reconciled  (if needed, eg during a big recon-
+                    ciliation)
+       cleared      complete, reconciled as far  as  possible,  and  considered
+                    correct
+
+       With  this scheme, you would use -PC to see the current balance at your
+       bank, -U to see things which will probably hit  your  bank  soon  (like
+       uncashed checks), and no flags to see the most up-to-date state of your
+       finances.
+
    Account names
-       Account  names  typically have several parts separated by a full colon,
-       from which hledger derives a hierarchical chart of accounts.  They  can
-       be  anything  you  like,  but  in  finance there are traditionally five
-       top-level accounts: assets, liabilities, income, expenses, and  equity.
+       Account names typically have several parts separated by a  full  colon,
+       from  which hledger derives a hierarchical chart of accounts.  They can
+       be anything you like, but  in  finance  there  are  traditionally  five
+       top-level  accounts: assets, liabilities, income, expenses, and equity.
 
-       Account  names  may  contain single spaces, eg: assets:accounts receiv-
-       able.  Because of this, they must always be followed  by  two  or  more
+       Account names may contain single  spaces,  eg:  assets:accounts receiv-
+       able.   Because  of  this,  they must always be followed by two or more
        spaces (or newline).
 
        Account names can be aliased.
@@ -171,7 +230,7 @@
        After the account name, there is usually an amount.  Important: between
        account name and amount, there must be two or more spaces.
 
-       Amounts consist of a number and (usually) a currency symbol or  commod-
+       Amounts  consist of a number and (usually) a currency symbol or commod-
        ity name.  Some examples:
 
        2.00001
@@ -184,53 +243,53 @@
 
        As you can see, the amount format is somewhat flexible:
 
-       o amounts  are a number (the "quantity") and optionally a currency sym-
+       o amounts are a number (the "quantity") and optionally a currency  sym-
          bol/commodity name (the "commodity").
 
-       o the commodity is a symbol, word, or phrase, on  the  left  or  right,
-         with  or  without a separating space.  If the commodity contains num-
-         bers, spaces or non-word punctuation it must be  enclosed  in  double
+       o the  commodity  is  a  symbol, word, or phrase, on the left or right,
+         with or without a separating space.  If the commodity  contains  num-
+         bers,  spaces  or  non-word punctuation it must be enclosed in double
          quotes.
 
        o negative amounts with a commodity on the left can have the minus sign
          before or after it
 
-       o digit groups (thousands, or any other grouping) can be  separated  by
-         commas  (in  which  case period is used for decimal point) or periods
+       o digit  groups  (thousands, or any other grouping) can be separated by
+         commas (in which case period is used for decimal  point)  or  periods
          (in which case comma is used for decimal point)
 
-       You can use any of these  variations  when  recording  data,  but  when
-       hledger  displays  amounts, it will choose a consistent format for each
-       commodity.  (Except for price amounts, which are  always  formatted  as
+       You  can  use  any  of  these  variations when recording data, but when
+       hledger displays amounts, it will choose a consistent format  for  each
+       commodity.   (Except  for  price amounts, which are always formatted as
        written).  The display format is chosen as follows:
 
        o if there is a commodity directive specifying the format, that is used
 
-       o otherwise the format is inferred from the  first  posting  amount  in
-         that  commodity  in the journal, and the precision (number of decimal
+       o otherwise  the  format  is  inferred from the first posting amount in
+         that commodity in the journal, and the precision (number  of  decimal
          places) will be the maximum from all posting amounts in that commmod-
          ity
 
-       o or  if  there are no such amounts in the journal, a default format is
+       o or if there are no such amounts in the journal, a default  format  is
          used (like $1000.00).
 
-       Price amounts and amounts in D directives usually don't  affect  amount
-       format  inference,  but  in  some situations they can do so indirectly.
-       (Eg when D's default commodity is applied to a  commodity-less  amount,
+       Price  amounts  and amounts in D directives usually don't affect amount
+       format inference, but in some situations they  can  do  so  indirectly.
+       (Eg  when  D's default commodity is applied to a commodity-less amount,
        or when an amountless posting is balanced using a price's commodity, or
-       when -V is used.) If you find this causing problems,  set  the  desired
+       when  -V  is  used.) If you find this causing problems, set the desired
        format with a commodity directive.
 
    Virtual Postings
-       When  you  parenthesise  the  account name in a posting, we call that a
+       When you parenthesise the account name in a posting,  we  call  that  a
        virtual posting, which means:
 
        o it is ignored when checking that the transaction is balanced
 
-       o it is excluded from reports when the --real/-R flag is used,  or  the
+       o it  is  excluded from reports when the --real/-R flag is used, or the
          real:1 query.
 
-       You  could  use  this,  eg, to set an account's opening balance without
+       You could use this, eg, to set an  account's  opening  balance  without
        needing to use the equity:opening balances account:
 
               1/1 special unbalanced posting to set initial balance
@@ -238,8 +297,8 @@
 
        When the account name is bracketed, we call it a balanced virtual post-
        ing.  This is like an ordinary virtual posting except the balanced vir-
-       tual postings in a transaction must balance to 0, like the  real  post-
-       ings  (but  separately  from them).  Balanced virtual postings are also
+       tual  postings  in a transaction must balance to 0, like the real post-
+       ings (but separately from them).  Balanced virtual  postings  are  also
        excluded by --real/-R or real:1.
 
               1/1 buy food with cash, and update some budget-tracking subaccounts elsewhere
@@ -249,13 +308,13 @@
                 [assets:checking:budget:food]  $-10
 
        Virtual postings have some legitimate uses, but those are few.  You can
-       usually  find an equivalent journal entry using real postings, which is
+       usually find an equivalent journal entry using real postings, which  is
        more correct and provides better error checking.
 
    Balance Assertions
-       hledger supports Ledger-style  balance  assertions  in  journal  files.
-       These  look  like =EXPECTEDBALANCE following a posting's amount.  Eg in
-       this example we assert the expected dollar balance in accounts a and  b
+       hledger  supports  Ledger-style  balance  assertions  in journal files.
+       These look like =EXPECTEDBALANCE following a posting's amount.   Eg  in
+       this  example we assert the expected dollar balance in accounts a and b
        after each posting:
 
               2013/1/1
@@ -267,31 +326,31 @@
                 b  $-1  =$-2
 
        After reading a journal file, hledger will check all balance assertions
-       and report an error if any of them fail.  Balance assertions  can  pro-
-       tect  you  from, eg, inadvertently disrupting reconciled balances while
-       cleaning up old entries.  You can disable  them  temporarily  with  the
-       --ignore-assertions  flag,  which  can be useful for troubleshooting or
+       and  report  an error if any of them fail.  Balance assertions can pro-
+       tect you from, eg, inadvertently disrupting reconciled  balances  while
+       cleaning  up  old  entries.   You can disable them temporarily with the
+       --ignore-assertions flag, which can be useful  for  troubleshooting  or
        for reading Ledger files.
 
    Assertions and ordering
-       hledger sorts an account's postings and assertions first  by  date  and
-       then  (for postings on the same day) by parse order.  Note this is dif-
+       hledger  sorts  an  account's postings and assertions first by date and
+       then (for postings on the same day) by parse order.  Note this is  dif-
        ferent from Ledger, which sorts assertions only by parse order.  (Also,
-       Ledger  assertions  do not see the accumulated effect of repeated post-
+       Ledger assertions do not see the accumulated effect of  repeated  post-
        ings to the same account within a transaction.)
 
-       So, hledger balance assertions keep  working  if  you  reorder  differ-
-       ently-dated  transactions  within  the  journal.   But  if  you reorder
+       So,  hledger  balance  assertions  keep  working if you reorder differ-
+       ently-dated transactions  within  the  journal.   But  if  you  reorder
        same-dated transactions or postings, assertions might break and require
-       updating.   This order dependence does bring an advantage: precise con-
+       updating.  This order dependence does bring an advantage: precise  con-
        trol over the order of postings and assertions within a day, so you can
        assert intra-day balances.
 
    Assertions and included files
-       With  included  files, things are a little more complicated.  Including
-       preserves the ordering of postings and assertions.  If you have  multi-
-       ple  postings  to  an  account  on the same day, split across different
-       files, and you also want to assert the account's balance  on  the  same
+       With included files, things are a little more  complicated.   Including
+       preserves  the ordering of postings and assertions.  If you have multi-
+       ple postings to an account on the  same  day,  split  across  different
+       files,  and  you  also want to assert the account's balance on the same
        day, you'll have to put the assertion in the right file.
 
    Assertions and multiple -f options
@@ -299,21 +358,21 @@
        -f options.  Use include or concatenate the files instead.
 
    Assertions and commodities
-       The asserted balance must be a simple single-commodity amount,  and  in
-       fact  the  assertion  checks  only  this commodity's balance within the
-       (possibly multi-commodity) account balance.  We could call this a  par-
-       tial  balance  assertion.  This is compatible with Ledger, and makes it
+       The  asserted  balance must be a simple single-commodity amount, and in
+       fact the assertion checks only  this  commodity's  balance  within  the
+       (possibly  multi-commodity) account balance.  We could call this a par-
+       tial balance assertion.  This is compatible with Ledger, and  makes  it
        possible to make assertions about accounts containing multiple commodi-
        ties.
 
-       To  assert  each commodity's balance in such a multi-commodity account,
-       you can add multiple postings (with amount 0 if necessary).   But  note
-       that  no  matter  how  many  assertions  you add, you can't be sure the
+       To assert each commodity's balance in such a  multi-commodity  account,
+       you  can  add multiple postings (with amount 0 if necessary).  But note
+       that no matter how many assertions you  add,  you  can't  be  sure  the
        account does not contain some unexpected commodity.  (We'll add support
        for this kind of total balance assertion if there's demand.)
 
    Assertions and subaccounts
-       Balance  assertions  do  not  count  the balance from subaccounts; they
+       Balance assertions do not count  the  balance  from  subaccounts;  they
        check the posted account's exclusive balance.  For example:
 
               1/1
@@ -321,7 +380,7 @@
                 checking        1 = 1  ; post to the parent account, its exclusive balance is now 1
                 equity
 
-       The balance report's flat mode  shows  these  exclusive  balances  more
+       The  balance  report's  flat  mode  shows these exclusive balances more
        clearly:
 
               $ hledger bal checking --flat
@@ -335,10 +394,10 @@
        tual.  They are not affected by the --real/-R flag or real: query.
 
    Balance Assignments
-       Ledger-style balance assignments are also supported.   These  are  like
-       balance  assertions, but with no posting amount on the left side of the
-       equals sign; instead it is calculated automatically so  as  to  satisfy
-       the  assertion.   This  can be a convenience during data entry, eg when
+       Ledger-style  balance  assignments  are also supported.  These are like
+       balance assertions, but with no posting amount on the left side of  the
+       equals  sign;  instead  it is calculated automatically so as to satisfy
+       the assertion.  This can be a convenience during data  entry,  eg  when
        setting opening balances:
 
               ; starting a new journal, set asset account balances
@@ -356,64 +415,75 @@
                 expenses:misc
 
        The calculated amount depends on the account's balance in the commodity
-       at  that  point  (which depends on the previously-dated postings of the
-       commodity to that account since the last balance assertion  or  assign-
+       at that point (which depends on the previously-dated  postings  of  the
+       commodity  to  that account since the last balance assertion or assign-
        ment).  Note that using balance assignments makes your journal a little
        less explicit; to know the exact amount posted, you have to run hledger
        or do the calculations yourself, instead of just reading it.
 
    Prices
    Transaction prices
-       Within  a  transaction  posting,  you  can  record an amount's price in
-       another commodity.  This can be used to document the cost (for  a  pur-
-       chase),  or  selling  price (for a sale), or the exchange rate that was
-       used, for this transaction.  These transaction prices are fixed, and do
-       not change over time.
+       Within a transaction, you can note an amount's price in another commod-
+       ity.   This can be used to document the cost (in a purchase) or selling
+       price (in a sale).  For  example,  transaction  prices  are  useful  to
+       record purchases of a foreign currency.
 
-       Amounts  with  transaction  prices  can be displayed in the transaction
-       price's commodity, by  using  the  --cost/-B  flag  supported  by  most
-       hledger commands (mnemonic: "cost Basis").
+       Transaction  prices  are  fixed,  and do not change over time.  (Ledger
+       users: Ledger uses a different syntax for fixed  prices,  {=UNITPRICE},
+       which hledger currently ignores).
 
        There are several ways to record a transaction price:
 
-       1. Write  the  unit price (aka exchange rate), as @ UNITPRICE after the
-          amount:
+       1. Write the price per unit, as @ UNITPRICE after the amount:
 
                   2009/1/1
-                    assets:foreign currency   100 @ $1.35  ; one hundred euros at $1.35 each
-                    assets:cash
+                    assets:euros     100 @ $1.35  ; one hundred euros purchased at $1.35 each
+                    assets:dollars                 ; balancing amount is -$135.00
 
-       2. Or write the total price, as @@ TOTALPRICE after the amount:
+       2. Write the total price, as @@ TOTALPRICE after the amount:
 
                   2009/1/1
-                    assets:foreign currency   100 @@ $135  ; one hundred euros at $135 for the lot
-                    assets:cash
+                    assets:euros     100 @@ $135  ; one hundred euros purchased at $135 for the lot
+                    assets:dollars
 
-       3. Or let hledger infer the price so as to balance the transaction.  To
-          permit  this,  you must fully specify all posting amounts, and their
-          sum must have a non-zero amount in exactly two commodities:
+       3. Specify amounts for all postings, using exactly two commodities, and
+          let hledger infer the price that balances the transaction:
 
                   2009/1/1
-                    assets:foreign currency   100          ; one hundred euros
-                    assets:cash              $-135          ; exchanged for $135
+                    assets:euros     100          ; one hundred euros purchased
+                    assets:dollars  $-135          ; for $135
 
-       With any of the above examples we get:
+       Amounts with transaction prices can be  displayed  in  the  transaction
+       price's commodity by using the -B/--cost flag (except for #551) ("B" is
+       from "cost Basis").  Eg for the above, here is how -B affects the  bal-
+       ance report:
 
-              $ hledger print -B
-              2009/01/01
-                  assets:foreign currency       $135.00
-                  assets:cash                  $-135.00
+              $ hledger bal -N --flat
+                             $-135  assets:dollars
+                              100  assets:euros
+              $ hledger bal -N --flat -B
+                             $-135  assets:dollars
+                              $135  assets:euros    # <- the euros' cost
 
-       Example use for transaction prices: recording the effective  conversion
-       rate of purchases made in a foreign currency.
+       Note  -B is sensitive to the order of postings when a transaction price
+       is inferred: the inferred price will be in the commodity  of  the  last
+       amount.  So if example 3's postings are reversed, while the transaction
+       is equivalent, -B shows something different:
 
+              2009/1/1
+                assets:dollars  $-135               ; 135 dollars sold
+                assets:euros     100               ; for 100 euros
+
+              $ hledger bal -N --flat -B
+                             -100  assets:dollars  # <- the dollars' selling price
+                              100  assets:euros
+
    Market prices
-       Market  prices are not tied to a particular transaction; they represent
-       historical exchange rates between two commodities.  (Ledger calls  them
-       historical  prices.)  For  example,  the  prices  published  by a stock
-       exchange or the foreign exchange market.  Some commands (balance,  cur-
-       rently)  can use this information to show the market value of things at
-       a given date.
+       Market prices are not tied to a particular transaction; they  represent
+       historical  exchange rates between two commodities.  (Ledger calls them
+       historical prices.) For  example,  the  prices  published  by  a  stock
+       exchange  or the foreign exchange market.  hledger can use these prices
+       to show the market value of things at a given date, see market value.
 
        To record market prices, use P directives in the main journal or in  an
        included file.  Their format is:
@@ -560,44 +630,43 @@
 
    Regex aliases
        There is also a more powerful variant that uses a  regular  expression,
-       indicated  by  the forward slashes.  (This was the default behaviour in
-       hledger 0.24-0.25):
+       indicated by the forward slashes:
 
               alias /REGEX/ = REPLACEMENT
 
        or --alias '/REGEX/=REPLACEMENT'.
 
-       REGEX is a case-insensitive regular expression.   Anywhere  it  matches
-       inside  an  account name, the matched part will be replaced by REPLACE-
-       MENT.  If REGEX contains parenthesised match groups, these can be  ref-
+       REGEX  is  a  case-insensitive regular expression.  Anywhere it matches
+       inside an account name, the matched part will be replaced  by  REPLACE-
+       MENT.   If REGEX contains parenthesised match groups, these can be ref-
        erenced by the usual numeric backreferences in REPLACEMENT.  Note, cur-
-       rently regular expression  aliases  may  cause  noticeable  slow-downs.
+       rently  regular  expression  aliases  may  cause noticeable slow-downs.
        (And if you use Ledger on your hledger file, they will be ignored.) Eg:
 
               alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3
               # rewrites "assets:bank:wells fargo:checking" to  "assets:wells fargo checking"
 
    Multiple aliases
-       You can define as many aliases as you like  using  directives  or  com-
-       mand-line  options.  Aliases are recursive - each alias sees the result
-       of applying previous ones.   (This  is  different  from  Ledger,  where
+       You  can  define  as  many aliases as you like using directives or com-
+       mand-line options.  Aliases are recursive - each alias sees the  result
+       of  applying  previous  ones.   (This  is  different from Ledger, where
        aliases are non-recursive by default).  Aliases are applied in the fol-
        lowing order:
 
-       1. alias directives, most recently seen first (recent  directives  take
+       1. alias  directives,  most recently seen first (recent directives take
           precedence over earlier ones; directives not yet seen are ignored)
 
        2. alias options, in the order they appear on the command line
 
    end aliases
-       You   can  clear  (forget)  all  currently  defined  aliases  with  the
+       You  can  clear  (forget)  all  currently  defined  aliases  with   the
        end aliases directive:
 
               end aliases
 
    account directive
-       The account directive predefines account names, as in Ledger and  Bean-
-       count.   This may be useful for your own documentation; hledger doesn't
+       The  account directive predefines account names, as in Ledger and Bean-
+       count.  This may be useful for your own documentation; hledger  doesn't
        make use of it yet.
 
               ; account ACCT
@@ -612,8 +681,8 @@
               ; etc.
 
    apply account directive
-       You can specify a  parent  account  which  will  be  prepended  to  all
-       accounts  within  a  section of the journal.  Use the apply account and
+       You  can  specify  a  parent  account  which  will  be prepended to all
+       accounts within a section of the journal.  Use  the  apply account  and
        end apply account directives like so:
 
               apply account home
@@ -630,7 +699,7 @@
                   home:food           $10
                   home:cash          $-10
 
-       If end apply account is omitted, the effect lasts to  the  end  of  the
+       If  end apply account  is  omitted,  the effect lasts to the end of the
        file.  Included files are also affected, eg:
 
               apply account business
@@ -639,16 +708,16 @@
               apply account personal
               include personal.journal
 
-       Prior  to  hledger 1.0, legacy account and end spellings were also sup-
+       Prior to hledger 1.0, legacy account and end spellings were  also  sup-
        ported.
 
    Multi-line comments
-       A line containing just comment starts a multi-line comment, and a  line
+       A  line containing just comment starts a multi-line comment, and a line
        containing just end comment ends it.  See comments.
 
    commodity directive
-       The  commodity directive predefines commodities (currently this is just
-       informational), and also it may define the display format  for  amounts
+       The commodity directive predefines commodities (currently this is  just
+       informational),  and  also it may define the display format for amounts
        in this commodity (overriding the automatically inferred format).
 
        It may be written on a single line, like this:
@@ -660,8 +729,8 @@
               ; separating thousands with comma.
               commodity 1,000.0000 AAAA
 
-       or  on  multiple  lines, using the "format" subdirective.  In this case
-       the commodity symbol appears twice and  should  be  the  same  in  both
+       or on multiple lines, using the "format" subdirective.   In  this  case
+       the  commodity  symbol  appears  twice  and  should be the same in both
        places:
 
               ; commodity SYMBOL
@@ -674,10 +743,10 @@
                 format INR 9,99,99,999.00
 
    Default commodity
-       The  D  directive  sets a default commodity (and display format), to be
+       The D directive sets a default commodity (and display  format),  to  be
        used for amounts without a commodity symbol (ie, plain numbers).  (Note
-       this  differs from Ledger's default commodity directive.) The commodity
-       and display format will be applied  to  all  subsequent  commodity-less
+       this differs from Ledger's default commodity directive.) The  commodity
+       and  display  format  will  be applied to all subsequent commodity-less
        amounts, or until the next D directive.
 
               # commodity-less amounts should be treated as dollars
@@ -689,8 +758,8 @@
                 b
 
    Default year
-       You  can set a default year to be used for subsequent dates which don't
-       specify a year.  This is a line beginning with Y followed by the  year.
+       You can set a default year to be used for subsequent dates which  don't
+       specify  a year.  This is a line beginning with Y followed by the year.
        Eg:
 
               Y2009      ; set default year to 2009
@@ -710,24 +779,24 @@
                 assets
 
    Including other files
-       You  can  pull in the content of additional journal files by writing an
+       You can pull in the content of additional journal files by  writing  an
        include directive, like this:
 
               include path/to/file.journal
 
-       If the path does not begin with a slash, it is relative to the  current
+       If  the path does not begin with a slash, it is relative to the current
        file.  Glob patterns (*) are not currently supported.
 
-       The  include  directive  can  only  be  used  in journal files.  It can
+       The include directive can only  be  used  in  journal  files.   It  can
        include journal, timeclock or timedot files, but not CSV files.
 
 EDITOR SUPPORT
        Add-on modes exist for various text editors, to make working with jour-
-       nal  files  easier.   They add colour, navigation aids and helpful com-
-       mands.  For hledger users who  edit  the  journal  file  directly  (the
+       nal files easier.  They add colour, navigation aids  and  helpful  com-
+       mands.   For  hledger  users  who  edit  the journal file directly (the
        majority), using one of these modes is quite recommended.
 
-       These  were  written  with  Ledger  in mind, but also work with hledger
+       These were written with Ledger in mind,  but  also  work  with  hledger
        files:
 
 
@@ -744,7 +813,7 @@
 
 
 REPORTING BUGS
-       Report bugs at http://bugs.hledger.org (or on the #hledger IRC  channel
+       Report  bugs at http://bugs.hledger.org (or on the #hledger IRC channel
        or hledger mail list)
 
 
@@ -758,7 +827,7 @@
 
 
 SEE ALSO
-       hledger(1),      hledger-ui(1),     hledger-web(1),     hledger-api(1),
+       hledger(1),     hledger-ui(1),     hledger-web(1),      hledger-api(1),
        hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
        dot(5), ledger(1)
 
@@ -766,4 +835,4 @@
 
 
 
-hledger 1.2                       March 2017                hledger_journal(5)
+hledger 1.3                        June 2017                hledger_journal(5)
diff --git a/doc/hledger_timeclock.5 b/doc/hledger_timeclock.5
--- a/doc/hledger_timeclock.5
+++ b/doc/hledger_timeclock.5
@@ -1,5 +1,5 @@
 
-.TH "hledger_timeclock" "5" "March 2017" "hledger 1.2" "hledger User Manuals"
+.TH "hledger_timeclock" "5" "June 2017" "hledger 1.3" "hledger User Manuals"
 
 
 
diff --git a/doc/hledger_timeclock.5.info b/doc/hledger_timeclock.5.info
--- a/doc/hledger_timeclock.5.info
+++ b/doc/hledger_timeclock.5.info
@@ -4,7 +4,7 @@
 
 File: hledger_timeclock.5.info,  Node: Top,  Up: (dir)
 
-hledger_timeclock(5) hledger 1.2
+hledger_timeclock(5) hledger 1.3
 ********************************
 
 hledger can read timeclock files.  As with Ledger, these are (a subset
diff --git a/doc/hledger_timeclock.5.txt b/doc/hledger_timeclock.5.txt
--- a/doc/hledger_timeclock.5.txt
+++ b/doc/hledger_timeclock.5.txt
@@ -79,4 +79,4 @@
 
 
 
-hledger 1.2                       March 2017              hledger_timeclock(5)
+hledger 1.3                        June 2017              hledger_timeclock(5)
diff --git a/doc/hledger_timedot.5 b/doc/hledger_timedot.5
--- a/doc/hledger_timedot.5
+++ b/doc/hledger_timedot.5
@@ -1,5 +1,5 @@
 
-.TH "hledger_timedot" "5" "March 2017" "hledger 1.2" "hledger User Manuals"
+.TH "hledger_timedot" "5" "June 2017" "hledger 1.3" "hledger User Manuals"
 
 
 
diff --git a/doc/hledger_timedot.5.info b/doc/hledger_timedot.5.info
--- a/doc/hledger_timedot.5.info
+++ b/doc/hledger_timedot.5.info
@@ -4,7 +4,7 @@
 
 File: hledger_timedot.5.info,  Node: Top,  Next: FILE FORMAT,  Up: (dir)
 
-hledger_timedot(5) hledger 1.2
+hledger_timedot(5) hledger 1.3
 ******************************
 
 Timedot is a plain text format for logging dated, categorised quantities
diff --git a/doc/hledger_timedot.5.txt b/doc/hledger_timedot.5.txt
--- a/doc/hledger_timedot.5.txt
+++ b/doc/hledger_timedot.5.txt
@@ -120,4 +120,4 @@
 
 
 
-hledger 1.2                       March 2017                hledger_timedot(5)
+hledger 1.3                        June 2017                hledger_timedot(5)
diff --git a/hledger-lib.cabal b/hledger-lib.cabal
--- a/hledger-lib.cabal
+++ b/hledger-lib.cabal
@@ -3,7 +3,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           hledger-lib
-version:        1.2
+version:        1.3
 synopsis:       Core data types, parsers and functionality for the hledger accounting tools
 description:    This is a reusable library containing hledger's core functionality.
                 .
@@ -59,6 +59,7 @@
   build-depends:
       base >=4.8 && <5
     , base-compat >=0.8.1
+    , ansi-terminal >= 0.6.2.3 && < 0.7
     , array
     , blaze-markup >=0.5.1
     , bytestring
@@ -71,7 +72,7 @@
     , directory
     , filepath
     , hashtables >= 1.2
-    , megaparsec >=5.0 && < 5.3
+    , megaparsec >=5.0 && < 5.4
     , mtl
     , mtl-compat
     , old-time
@@ -131,6 +132,7 @@
       Hledger.Reports.PostingsReport
       Hledger.Reports.TransactionsReports
       Hledger.Utils
+      Hledger.Utils.Color
       Hledger.Utils.Debug
       Hledger.Utils.Parse
       Hledger.Utils.Regex
@@ -153,6 +155,7 @@
   build-depends:
       base >=4.8 && <5
     , base-compat >=0.8.1
+    , ansi-terminal >= 0.6.2.3 && < 0.7
     , array
     , blaze-markup >=0.5.1
     , bytestring
@@ -165,7 +168,7 @@
     , directory
     , filepath
     , hashtables >= 1.2
-    , megaparsec >=5.0 && < 5.3
+    , megaparsec >=5.0 && < 5.4
     , mtl
     , mtl-compat
     , old-time
@@ -218,6 +221,7 @@
       Hledger.Reports.ReportOptions
       Hledger.Reports.TransactionsReports
       Hledger.Utils
+      Hledger.Utils.Color
       Hledger.Utils.Debug
       Hledger.Utils.Parse
       Hledger.Utils.Regex
@@ -238,6 +242,7 @@
   build-depends:
       base >=4.8 && <5
     , base-compat >=0.8.1
+    , ansi-terminal >= 0.6.2.3 && < 0.7
     , array
     , blaze-markup >=0.5.1
     , bytestring
@@ -250,7 +255,7 @@
     , directory
     , filepath
     , hashtables >= 1.2
-    , megaparsec >=5.0 && < 5.3
+    , megaparsec >=5.0 && < 5.4
     , mtl
     , mtl-compat
     , old-time
@@ -312,6 +317,7 @@
       Hledger.Reports.ReportOptions
       Hledger.Reports.TransactionsReports
       Hledger.Utils
+      Hledger.Utils.Color
       Hledger.Utils.Debug
       Hledger.Utils.Parse
       Hledger.Utils.Regex
diff --git a/tests/hunittests.hs b/tests/hunittests.hs
--- a/tests/hunittests.hs
+++ b/tests/hunittests.hs
@@ -1,6 +1,10 @@
 import Hledger (tests_Hledger)
+import System.Environment (getArgs)
 import Test.Framework.Providers.HUnit (hUnitTestToTests)
-import Test.Framework.Runners.Console (defaultMain)
+import Test.Framework.Runners.Console (defaultMainWithArgs)
 
 main :: IO ()
-main = defaultMain $ hUnitTestToTests tests_Hledger
+main = do
+  args <- getArgs
+  let args' = "--hide-successes" : args
+  defaultMainWithArgs (hUnitTestToTests tests_Hledger) args'
