diff options
author | Craig Earls <enderw88@gmail.com> | 2013-04-06 23:13:49 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-04-06 23:13:49 -0700 |
commit | 4df990014fede0c7b0c23396f32b1f2c7c636426 (patch) | |
tree | ec695fcacfffd67a6cb8e052830f433fdb8cd1b7 /lisp/ldg-xact.el | |
parent | 2f3053401a043495860d6d6ee1febe48c3b537aa (diff) | |
download | ledger-4df990014fede0c7b0c23396f32b1f2c7c636426.tar.gz ledger-4df990014fede0c7b0c23396f32b1f2c7c636426.tar.bz2 ledger-4df990014fede0c7b0c23396f32b1f2c7c636426.zip |
Fixed reconciliation initialization. Now prompts with only account, not status and amount
Moved context function to leg-context, from leg-report. Cleaned up many regex in ldg-context.
Diffstat (limited to 'lisp/ldg-xact.el')
-rw-r--r-- | lisp/ldg-xact.el | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lisp/ldg-xact.el b/lisp/ldg-xact.el index 31b9818f..b66bba04 100644 --- a/lisp/ldg-xact.el +++ b/lisp/ldg-xact.el @@ -67,12 +67,12 @@ within the transaction." (overlay-put ovl 'priority 100)))) (defun ledger-xact-payee () - "Return the payee of the entry containing point or nil." + "Return the payee of the transaction containing point or nil." (let ((i 0)) (while (eq (ledger-context-line-type (ledger-context-other-line i)) 'acct-transaction) (setq i (- i 1))) (let ((context-info (ledger-context-other-line i))) - (if (eq (ledger-context-line-type context-info) 'entry) + (if (eq (ledger-context-line-type context-info) 'xact) (ledger-context-field-value context-info 'payee) nil)))) @@ -116,21 +116,6 @@ MOMENT is an encoded date" (goto-char (point-min)) (forward-line (1- line-number))) -(defun ledger-thing-at-point () - "Describe thing at points. Return 'transaction, 'posting, or nil." - (let ((here (point))) - (goto-char (line-beginning-position)) - (cond ((looking-at "^[0-9/.=-]+\\(\\s-+\\*\\)?\\(\\s-+(.+?)\\)?\\s-+") - (goto-char (match-end 0)) - 'transaction) - ((looking-at "^\\s-+\\([*!]\\s-+\\)?[[(]?\\(.\\)") - (goto-char (match-beginning 2)) - 'posting) - ((looking-at "^\\(sun\\|mon\\|tue\\|wed\\|thu\\|fri\\|sat\\)\\s-+") - (goto-char (match-end 0)) - 'entry) - (t - (ignore (goto-char here)))))) (defun ledger-copy-transaction-at-point (date) "Ask for a new DATE and copy the transaction under point to that date. Leave point on the first amount." |