diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-13 05:24:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-13 05:24:28 -0400 |
commit | 70344b82e70f454462f31daec05d79554804e8f8 (patch) | |
tree | d9f3252972cd3b83453ea0d5dfee932f99c4a793 /src/main.cc | |
parent | 037dd0f716e82568b005a78ee4d79fce0b886af3 (diff) | |
download | fork-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.cc | 4 |
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; |