From 13b4c5adc000ca17c03a7d412f6e0a12a0f35e74 Mon Sep 17 00:00:00 2001 From: David Keegan Date: Sat, 9 Mar 2013 18:39:30 +0000 Subject: Fixed bug 913 ledger mode C-c C-a and ISO dates. --- lisp/ldg-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 84ccf62b..97662aa3 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -167,8 +167,8 @@ MOMENT is an encoded date" (while (not (eobp)) (when (looking-at (concat "\\(Y\\s-+\\([0-9]+\\)\\|" - "\\([0-9]\\{4\\}+\\)?[./]?" - "\\([0-9]+\\)[./]\\([0-9]+\\)\\s-+" + "\\([0-9]\\{4\\}+\\)?[./-]?" + "\\([0-9]+\\)[./-]\\([0-9]+\\)\\s-+" "\\(\\*\\s-+\\)?\\(.+\\)\\)")) (let ((found (match-string 2))) (if found @@ -215,7 +215,7 @@ correct chronological place in the buffer." exit-code) (unless insert-at-point (let ((date (car args))) - (if (string-match "\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\)" date) + (if (string-match "\\([0-9]+\\)[-/]\\([0-9]+\\)[-/]\\([0-9]+\\)" date) (setq date (encode-time 0 0 0 (string-to-number (match-string 3 date)) (string-to-number (match-string 2 date)) -- cgit v1.2.3 From 007836dfce1dcba54f6bbb5f0a5c3f9eb12e21da Mon Sep 17 00:00:00 2001 From: David Keegan Date: Sat, 9 Mar 2013 19:19:40 +0000 Subject: ledger-sort-region did nothing if point was at end of region. --- lisp/ldg-sort.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ldg-sort.el b/lisp/ldg-sort.el index 33ae2a98..01d8edc9 100644 --- a/lisp/ldg-sort.el +++ b/lisp/ldg-sort.el @@ -76,6 +76,7 @@ (new-end end)) (save-excursion (save-restriction + (goto-char beg) (ledger-next-record-function) ;; make sure point is at the ;; beginning of a xact (setq new-beg (point)) -- cgit v1.2.3