summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/report.cc7
-rw-r--r--src/report.h7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/report.cc b/src/report.cc
index 7d8353d9..9da1c357 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -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':
diff --git a/src/report.h b/src/report.h
index 15ee82c6..96965b16 100644
--- a/src/report.h
+++ b/src/report.h
@@ -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();
}