From c8dd5d4a0a88b22e9923ac2b5746a1812386a848 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Tue, 9 Dec 2014 14:40:39 +0000 Subject: [emacs] When the first line is a txn, include it in ledger-sort-buffer Without this fix, ledger-sort-region tends to skip the first transaction when sorting a region or the entire buffer. --- lisp/ledger-sort.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/ledger-sort.el') diff --git a/lisp/ledger-sort.el b/lisp/ledger-sort.el index 534d3b24..23cfbae9 100644 --- a/lisp/ledger-sort.el +++ b/lisp/ledger-sort.el @@ -79,6 +79,8 @@ (goto-char beg) ;; make sure point is at the beginning of a xact (ledger-navigate-next-xact) + (unless (looking-at ledger-payee-any-status-regex) + (ledger-navigate-next-xact)) (setq new-beg (point)) (goto-char end) (ledger-navigate-next-xact) -- cgit v1.2.3