Turned on the "emacs" command and budgeting, though neither are tested yet.

This commit is contained in:
John Wiegley 2009-02-12 03:30:57 -04:00
parent c8cd2c468e
commit c328b1b3b2
2 changed files with 12 additions and 2 deletions

View file

@ -34,11 +34,13 @@
#include "filters.h"
#include "chain.h"
#include "output.h"
#include "emacs.h"
#include "precmd.h"
namespace ledger {
report_t::report_t(session_t& _session) : session(_session)
report_t::report_t(session_t& _session)
: session(_session), budget_flags(BUDGET_NO_BUDGET)
{
// Setup default values for some of the option handlers
HANDLER(date_format_).on("%y-%b-%d");
@ -524,7 +526,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
else if (is_eq(p, "entry"))
return WRAP_FUNCTOR(entry_command);
else if (is_eq(p, "emacs"))
return NULL; // jww (2009-02-07): NYI
return WRAP_FUNCTOR
(reporter<>(new format_emacs_xacts(output_stream), *this));
break;
case 'p':

View file

@ -108,7 +108,14 @@ public:
session_t& session;
output_stream_t output_stream;
#define BUDGET_NO_BUDGET 0x00
#define BUDGET_BUDGETED 0x01
#define BUDGET_UNBUDGETED 0x02
uint_least8_t budget_flags;
explicit report_t(session_t& _session);
virtual ~report_t() {
output_stream.close();
}