Commit graph

5100 commits

Author SHA1 Message Date
Steve Purcell
3b5f496536 ledger-mode: only modify completion-at-point-functions locally
Without this patch, the addition of pcomplete-completions-at-point
leaks into the global value of completion-at-point-functions.

See #227
2014-01-07 20:33:08 +00:00
Craig Earls
af84005a52 Backed out recent changes that broke the complete cycling behavior. 2014-01-07 13:25:07 -07:00
John Wiegley
f5d5149d76 Merge pull request #230 from purcell/fix-csv-commodity-column
Commodity column in default CSV format should match the displayed amount
2014-01-06 12:51:49 -08:00
Steve Purcell
d7742cd654 Commodity column in default CSV format should match the displayed amount
If one uses --exchange to force CSV display amounts into a particular
currency, then the commodity output column should match that currency.

Without this patch, the commodity column contains the original
commodity, not the commodity for the exported amount.
2014-01-06 17:37:04 +00:00
Craig Earls
bde5e69c9a Merge pull request #228 from the-kenny/emacs-prompt-effective-date
Emacs: Improve effictive-date-handling
2014-01-02 10:09:23 -08:00
Moritz Ulrich
741a275cc9 Use `ledger-read-date' where applicable. 2014-01-02 19:00:37 +01:00
Moritz Ulrich
8406adce0e ledger-read-date': Use ledger-minibuffer-history'. 2014-01-02 18:55:25 +01:00
Moritz Ulrich
09ef323a73 ledger-reconcile: Add option to insert an effective date when clearing transactions. 2014-01-02 18:44:15 +01:00
Moritz Ulrich
26bc890d88 ledger-insert-effective-date': use ledger-read-date'.
Running `ledger-insert-effective-date' will now prompt for a date with
a pre-filled value of the `(ledger-year-and-month)' ("2014/01/"). Just
pressing RET without inserting the 'day'-portion will insert the date
of today.
2014-01-02 18:43:53 +01:00
Moritz Ulrich
3ff5fddafd Add `ledger-read-date' - Read date & default to today. 2014-01-02 18:24:54 +01:00
Craig Earls
876cfa1f78 Merge pull request #227 from 4ourbit/patch-2
More context-aware ledger pcomplete rules.

Thanks.
2014-01-01 13:26:19 -08: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
Craig Earls
c00e4eb8c6 Merge pull request #226 from the-kenny/emacs-bugfixes
Bugfixes & Improvements for Emacs Support

Thanks!
2013-12-29 16:55:54 -08: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
John Wiegley
8d38060968 Merge pull request #225 from 4ourbit/patch-1
fix for unexpected point movement
2013-12-23 16:33:40 -08: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
Johann Klähn
4e997836c3 remove contrib/vim and point to new location 2013-12-16 18:27:24 +01:00
Craig Earls
50f63a8bfd Merge pull request #223 from vanicat/t/schedule-with-args
I should have done this a long time ago, but I got too lazy.  Thanks Remi!
2013-12-12 11:24:07 -08: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
56f6a4d83e Don't default fill-column to 8 in Emacs 2013-12-11 12:52:58 +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
Craig Earls
2b94b264be Merge pull request #221 from purcell/top-level-keymaps
ledger-mode: declare keymaps at the top level
2013-12-09 12:55:50 -08:00
Steve Purcell
c85643b04e ledger-mode: declare keymaps at the top level 2013-12-09 20:41:01 +00:00
Craig Earls
123ada2f37 Merge pull request #220 from purcell/ledger-mode-syntax-table
ledger-mode: define and use a syntax table so that comments are handled properly
2013-12-09 11:24:34 -08: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
Craig Earls
0e5867bc5c Merge pull request #218 from vanicat/t/reload-init
Reload init when calling ledger-init-load-init-file again.

I don't know why I missed that before.  This is how it is supposed to work. Thanks.
2013-11-26 10:02:12 -08:00
Craig Earls
f49b425fee Merge pull request #217 from vanicat/t/scheduling-docs
Correction of docs on Scheduling Transactions
2013-11-26 09:59:40 -08: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
Rémi Vanicat
665279896d Correction of docs on Scheduling Transactions 2013-11-26 13:15:12 +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
Craig Earls
d51e6f32d7 Merge pull request #214 from purcell/patch-1
ledger-mode: Fix provided feature to match file/package name
2013-11-03 14:58:08 -08: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
d7d442135b And const directives in account.h and commodity.h to allow build in OS X Mavericks. 2013-10-30 06:40:17 -07:00
Johann Klähn
de5cc27914 install texinfo files 2013-10-23 22:14:25 +02:00
Craig Earls
52228e7cc1 Merge branch 'master' into ledger-mode-automatic-transactions 2013-10-02 07:43:54 -07:00
John Wiegley
6ebb05ebb7 Merge pull request #213 from kain88-de/readme_typo
fix README.md build command
2013-09-30 11:00:58 -07:00