summaryrefslogtreecommitdiff
path: root/src/main.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/main.cc
parent037dd0f716e82568b005a78ee4d79fce0b886af3 (diff)
downloadfork-ledger-70344b82e70f454462f31daec05d79554804e8f8.tar.gz
fork-ledger-70344b82e70f454462f31daec05d79554804e8f8.tar.bz2
fork-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/main.cc')
-rw-r--r--src/main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc
index 30a54b3b..74ef9c64 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -92,7 +92,7 @@ int main(int argc, char * argv[], char * envp[])
if (global_scope->HANDLED(script_)) {
// Ledger is being invoked as a script command interpreter
- global_scope->read_journal_files();
+ global_scope->session().read_journal_files();
status = 0;
@@ -115,7 +115,7 @@ int main(int argc, char * argv[], char * envp[])
// Commence the REPL by displaying the current Ledger version
global_scope->show_version_info(std::cout);
- global_scope->read_journal_files();
+ global_scope->session().read_journal_files();
bool exit_loop = false;