summaryrefslogtreecommitdiff
path: root/emacs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.cc')
-rw-r--r--emacs.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs.cc b/emacs.cc
index 3a2dd503..63e5332c 100644
--- a/emacs.cc
+++ b/emacs.cc
@@ -4,6 +4,16 @@ namespace ledger {
void format_emacs_transactions::write_entry(entry_t& entry)
{
+ int idx = entry.src_idx;
+
+ for (strings_list::iterator i = entry.journal->sources.begin();
+ i != entry.journal->sources.end();
+ i++)
+ if (! idx--) {
+ out << "\"" << *i << "\" ";
+ break;
+ }
+
out << (((unsigned long)entry.beg_pos) + 1) << " ";
switch (entry.state) {