From 62996f9366fc582f0e2cebe8d88aea9095629239 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Mon, 1 Apr 2013 10:15:48 -0700 Subject: Make 'return' visit source in reports, make Visit Source the entry in reconcile mode. --- lisp/ldg-reconcile.el | 2 +- lisp/ldg-report.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el index 5a6a117a..bec6d175 100644 --- a/lisp/ldg-reconcile.el +++ b/lisp/ldg-reconcile.el @@ -434,7 +434,7 @@ moved and recentered. If they aren't strange things happen." (define-key map [menu-bar ldg-recon-menu qui] '("Quit" . ledger-reconcile-quit)) (define-key map [menu-bar ldg-recon-menu sep1] '("--")) (define-key map [menu-bar ldg-recon-menu pre] '("Previous Entry" . previous-line)) - (define-key map [menu-bar ldg-recon-menu vis] '("Visit Entry" . ledger-reconcile-visit)) + (define-key map [menu-bar ldg-recon-menu vis] '("Visit Source" . ledger-reconcile-visit)) (define-key map [menu-bar ldg-recon-menu nex] '("Next Entry" . next-line)) (define-key map [menu-bar ldg-recon-menu sep2] '("--")) (define-key map [menu-bar ldg-recon-menu del] '("Delete Entry" . ledger-reconcile-delete)) diff --git a/lisp/ldg-report.el b/lisp/ldg-report.el index 04c182dd..3225d803 100644 --- a/lisp/ldg-report.el +++ b/lisp/ldg-report.el @@ -103,7 +103,7 @@ text that should replace the format specifier." 'ledger-report-kill) (define-key map [(control ?c) (control ?l) (control ?e)] 'ledger-report-edit) - (define-key map [(control ?c) (control ?c)] 'ledger-report-visit-source) + (define-key map [return] 'ledger-report-visit-source) (define-key map [menu-bar] (make-sparse-keymap "ldg-rep")) -- cgit v1.2.3 From 4adcad6b2ccae539e2dd237bb78432e0f2fabcac Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Mon, 1 Apr 2013 12:37:02 -0700 Subject: Prevent sort-buffer from calling all the after-change hooks --- lisp/ldg-sort.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ldg-sort.el b/lisp/ldg-sort.el index 45b55c47..5119db5d 100644 --- a/lisp/ldg-sort.el +++ b/lisp/ldg-sort.el @@ -74,6 +74,7 @@ ;; automagically (let ((new-beg beg) (new-end end)) + (setq inhibit-modification-hooks t) (save-excursion (save-restriction (goto-char beg) @@ -93,7 +94,8 @@ nil 'ledger-next-record-function 'ledger-end-record-function - 'ledger-sort-startkey)))))) + 'ledger-sort-startkey)))) + (setq inhibit-modification-hooks nil))) (defun ledger-sort-buffer () "Sort the entire buffer." -- cgit v1.2.3 From 024697c4fcd552b6dd806c5be1a916f95393b5be Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Mon, 1 Apr 2013 16:32:45 -0700 Subject: Fix Bug 941, ensure two spaces are left between account and amount --- lisp/ldg-post.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ldg-post.el b/lisp/ldg-post.el index 91ee623d..554b8578 100644 --- a/lisp/ldg-post.el +++ b/lisp/ldg-post.el @@ -187,7 +187,8 @@ region align the posting on the current line." (when (setq amt-offset (ledger-next-amount (line-end-position))) (let* ((amt-adjust (- ledger-post-amount-alignment-column amt-offset - (current-column)))) + (current-column) + 2))) (if (/= amt-adjust 0) (if (> amt-adjust 0) (insert (make-string amt-adjust ? )) -- cgit v1.2.3 From 78bedf7c8ea15e369f56fbd317d03deb35343258 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Mon, 1 Apr 2013 16:34:30 -0700 Subject: Bring back comments into account completion. --- lisp/ldg-complete.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ldg-complete.el b/lisp/ldg-complete.el index 65206026..fe27e91d 100644 --- a/lisp/ldg-complete.el +++ b/lisp/ldg-complete.el @@ -77,10 +77,9 @@ Return tree structure" (split-string (match-string-no-properties 2) ":")) (let ((root account-tree)) - (while (and account-elements - (not (char-equal (string-to-char (car account-elements)) ?\;))) - (let ((entry (assoc (car account-elements) root))) - (if entry + (while account-elements + (let ((entry (assoc (car account-elements) root))) + (if entry (setq root (cdr entry)) (setq entry (cons (car account-elements) (list t))) (nconc root (list entry)) -- cgit v1.2.3