Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ledger-report.el
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,13 @@ used to generate the buffer, navigating the buffer, etc."
(edit (not (null current-prefix-arg))))
(list rname edit))))
(let* ((file (ledger-master-file))
(buf (find-file-noselect file)))
(buf (find-file-noselect file))
(local-ledger-reports (when (local-variable-p 'ledger-reports) ledger-reports)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be simpler to unconditionally use whatever value ledger-reports has in the current buffer.

(with-current-buffer
(pop-to-buffer (get-buffer-create ledger-report-buffer-name))
(ledger-report-mode)
(when local-ledger-reports
(set (make-local-variable 'ledger-reports) local-ledger-reports))
(setq ledger-report-saved nil)
(setq ledger-report-ledger-buf buf)
(setq ledger-report-name report-name)
Expand Down