summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-13 05:24:28 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-13 05:24:28 -0400
commit70344b82e70f454462f31daec05d79554804e8f8 (patch)
treed9f3252972cd3b83453ea0d5dfee932f99c4a793 /src/report.cc
parent037dd0f716e82568b005a78ee4d79fce0b886af3 (diff)
downloadledger-70344b82e70f454462f31daec05d79554804e8f8.tar.gz
ledger-70344b82e70f454462f31daec05d79554804e8f8.tar.bz2
ledger-70344b82e70f454462f31daec05d79554804e8f8.zip
Added a "reload" command, for use at the REPL
Created a new function, session_t::reread_journal_files, which throws away all previous state data and reads in the same files again. This is needed to allow Emacs to communicate with Ledger via the REPL, so that it tell Ledger when it has made changes to the user's data file.
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index a4076d9f..335974d2 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -556,6 +556,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
return WRAP_FUNCTOR
(reporter<>(new format_xacts(*this, HANDLER(register_format_).str()),
*this));
+ else if (is_eq(p, "reload"))
+ return MAKE_FUNCTOR(report_t::reload_command);
break;
case 's':