Commit graph

398 commits

Author SHA1 Message Date
Moritz Ulrich
3ff5fddafd Add `ledger-read-date' - Read date & default to today. 2014-01-02 18:24:54 +01:00
4ourbit
e00ed8c770 Fix for pcomplete Metadata rule. 2014-01-01 22:00:26 +01:00
4ourbit
316b1b7cfe Plugging ledger pcomplete into completion-at-point.
Added documentation on how to use pcomplete transparently via completion-at-point.
2014-01-01 22:00:26 +01:00
4ourbit
383f17f114 Context-aware pcomplete rules.
Provide completions based on information retrieved with 'ledger-context-at-point'.
To support step-by-step completion of transactions some more patterns were added
to 'ledger-line-config'. The actual completion rules mostly reuse some of the
convenient input commands that are buried in ledger-mode. Using the standard
pcomplete termination string (" ") to allow a "context switch" at the end of each
completion step.
2013-12-31 03:16:57 +01:00
Moritz Ulrich
9f694169a8 ledger-mode: Introduce `ledger-default-date-format'.
Some elisp functions depend on a date-format supplied in ~/.ledgerrc. Change these by introducing a default ("%Y/%m/%d").

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-30 01:41:31 +01:00
Moritz Ulrich
7dd82f8bac Improve `ledger-insert-effective-date'.
The function now replaces already existing effective dates in the same
line.

With a prefix (C-u C-c C-t), remove the current effective date.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-30 00:50:48 +01:00
Moritz Ulrich
6dbb36f525 ledger-mode: Add `ledger-remove-effective-date'.
Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-30 00:22:43 +01:00
Moritz Ulrich
15b94e8f44 emacs-mode: Prefix every function/variable/macro with ledger-.
This is the common convention in Emacs Lisp. Not following it might
cause problems with other packages as functions/variables/macros are
always visible to other modules.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-29 22:56:45 +01:00
Moritz Ulrich
c0812b91bf Fix `ledger-string-to-number' for decimal-comma
--=-=-=
Content-Type: text/plain

Hi John,

Small bug, caused by ill-formatted elisp. This is a small patch, so i
think making a fork & opening a Pull Request is a bit too much. I'll go
this route if I make bigger contributions in the future.

From de1fb19ded5300a227d58e3d3094928b211db09b Mon Sep 17 00:00:00 2001
From: Moritz Ulrich <moritz@tarn-vedra.de>
Date: Sat, 28 Dec 2013 22:37:54 +0100
Subject: [PATCH] ledger-string-to-number: Fix nil return value with
 decimal-comma.

Unfavorable formatting hid this bug pretty well. In case of true-ish
`decimal-comma' or "decimal-comma' in `ledger-environment-alist', the
ill-formatted `if' (and the whole function) returns nil.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
2013-12-28 18:11:25 -06:00
4ourbit
f18833c78b fix for unexpected point movement
bug fixed: point moves to previous char when called at whitespace-only line
2013-12-23 14:06:20 +01:00
Rémi Vanicat
ead3bbb7bf ledger-schedule-upcoming take argument.
One can forget to run ledger-schedule-upcoming for some time. Then there
is the risk that ledger-schedule-look-backward is too short. This will
open the possibility to use a different file, or to change the period
backward or forward for this kind of case.
2013-12-12 18:56:16 +01:00
Rémi Vanicat
b4897a9e7c Pop the new schedule buffers 2013-12-12 18:56:05 +01:00
Steve Purcell
dcd9cc4b17 ledger-mode: Also bind g to ledger-report-redo, as is standard elsewhere 2013-12-11 19:08:56 +00:00
Steve Purcell
ccaaf7e235 ledger-mode: Fix a number of byte-compilation warnings 2013-12-11 08:36:22 +00:00
Steve Purcell
12816a77e3 ledger-mode: Add missing argument to ledger-delete-current-transaction 2013-12-11 08:36:22 +00:00
Steve Purcell
6eca277bbc ledger-mode: Remove duplication in ledger-set-{year,month} 2013-12-11 08:36:22 +00:00
Steve Purcell
75a2d9d31e ledger-mode: Add namespace prefix to highlight-overlay
make-variable-buffer-local is a top-level form: this commit moves that
call from ledger-mode to next to the variable's declaration.
2013-12-11 08:36:22 +00:00
Steve Purcell
aaf20ab07f ledger-mode: Use easymenu to remove boilerplate
Among other benefits, this lets us define the menu entries from top to
bottom, rather than in reverse.
2013-12-11 08:31:07 +00:00
Steve Purcell
c85643b04e ledger-mode: declare keymaps at the top level 2013-12-09 20:41:01 +00:00
Steve Purcell
a74053b010 ledger-mode: define and use a syntax table so that comments are handled properly
Specifically, functionality which uses syntax-ppss to detect comments
needs the syntax table to be aware of them. A prime example is
goto-address-prog-mode.

This commit adds a basic syntax table for this purpose.
2013-12-09 19:11:23 +00:00
Rémi Vanicat
5b4400b2d0 Reload init when calling ledger-init-load-init-file again.
When the ledger-init-load-init-file was called again, it used to parse ledger
init file, and to throw away the result. No you can use it to load this file
again when you have change something in it.
2013-11-26 13:19:38 +01:00
Craig Earls
fc716a5ca1 Merge branch 'ledger-mode-automatic-transactions'
Conflicts:
	lisp/ledger-post.el
2013-11-12 09:24:29 -07:00
Craig Earls
f34ad34b89 Fix values pushed to calc 2013-11-12 09:21:44 -07:00
Craig Earls
1db0b0892c Merge branch 'master' into ledger-mode-automatic-transactions 2013-11-06 08:48:54 -07:00
Steve Purcell
979b5b990a Fix provided feature to match file/package name
For `require` to work correctly, the provided feature name
must match the name of the file.
2013-11-03 21:34:55 +00:00
Craig Earls
bee6605e08 Merge branch 'master' into ledger-mode-automatic-transactions 2013-09-20 07:26:44 -07:00
Vinod Kurup
7704018968 Find first numeral or minus sign, instead of blind move 2013-09-08 13:57:09 -04:00
Vinod Kurup
816f4405b0 Move past the commodity sign 2013-09-07 06:56:22 -04:00
Simon Kaczor
3105f13a7b Update CMakeLists.txt
renamed files from ldg to ledger. Don't compile ledger-context.el because it has a macro.
2013-08-21 09:29:40 -04:00
Craig Earls
9f3afc26f5 Merge branch 'master' into ledger-mode-automatic-transactions
Conflicts:
	lisp/ledger-reconcile.el
2013-08-20 09:58:39 -07:00
Craig Earls
46bf142b2a Bug 986. Add file order to sorting options in the reconcile mode. 2013-08-20 09:51:11 -07:00
Craig Earls
8b84aff855 Merge branch 'master' into ledger-mode-automatic-transactions 2013-07-19 16:41:56 -07:00
Gergely Risko
515ae05d6b Change ledger-next-amount to be case-sensitive
Otherwise if there is an account that's name only has one part, the
regex can match it as a currency and as the beginning of an amount.
E.g. if we have the line "Expenses         45 USD", then the old
ledger-next-amount will jump to Expenses instead of to 45.
2013-07-12 01:17:40 +02:00
Gergely Risko
87da7ba3ab Fix comment string 2013-07-09 16:41:55 +02:00
Craig Earls
f16a83a66c Merge branch 'master' into ledger-mode-automatic-transactions 2013-07-03 14:07:54 -07:00
Craig Earls
64d6ec675d Add ledger-mode-should-check-version to disable startup checks.
This is for users who are not using the official Ledger, say maybe hedger…
2013-07-03 13:57:56 -07:00
Craig Earls
bb529381c7 Add Schedule Upcoming to Ledger menu 2013-07-03 13:56:44 -07:00
Craig Earls
0d4641acc2 Merge branch 'master' into ledger-mode-automatic-transactions
Conflicts:
	lisp/ledger-init.el
	lisp/ledger-mode.el
	lisp/ledger-reconcile.el
	lisp/ledger-schedule.el
2013-07-02 15:50:32 -07:00
Craig Earls
63ba45dbaa Finished changing name to ledger-*
All files and references changed ldg-* to ledger-*
2013-07-02 15:37:33 -07:00
Craig Earls
b1edc38e42 Merge branch 'master' into ledger-mode-automatic-transactions 2013-07-02 14:51:02 -07:00
Craig Earls
5b8817c8e8 Remove leg-new and made leg-mode the entry point. 2013-07-02 14:45:06 -07:00
Craig Earls
d01b888384 Formatting cleanup 2013-07-02 13:18:18 -07:00
Craig Earls
cf2fa5c32b Formatting changes and initial inclusion of ledger-schedule 2013-07-02 13:16:28 -07:00
Craig Earls
a6cb179d8a Adjust subtraction to scale operands up, thereby avoiding the silly long results 2013-07-02 12:05:00 -07:00
Craig Earls
8da79a8967 Ensure target balance is actually parseable as a number 2013-07-01 11:01:47 -07:00
Craig Earls
52dd81ca9e Added buffer cleanup and tweaked the reconcile quit routines. 2013-06-27 21:36:22 -07:00
Craig Earls
9d64d14fd3 Add buffer cleanup function. 2013-06-06 12:53:01 -07:00
Craig Earls
7540647f01 Dramatic improvements to account completion speeds. 2013-06-05 16:41:11 -07:00
Craig Earls
e0b02afd60 Implemented different sorting function on the reconcile buffer.
C-c C-a for amount
C-c C-p for payee
C-c C-d for date
2013-06-03 17:14:19 -07:00
Craig Earls
c23c994b22 Fix Bug 966 Auto Indent conflicts with undo. Removed the auto-indent function and added an indent xact function 2013-06-03 16:39:36 -07:00