Merge branch 'master' into ledger-mode-automatic-transactions
This commit is contained in:
commit
bee6605e08
7 changed files with 32 additions and 55 deletions
14
README-1ST
14
README-1ST
|
|
@ -11,22 +11,10 @@ almost certainly going to run into problems. In future, you can run
|
||||||
'acprep update' again and again, and it will keep you updated to the
|
'acprep update' again and again, and it will keep you updated to the
|
||||||
very latest version.
|
very latest version.
|
||||||
|
|
||||||
I further recommend building both debug and optimized versions of Ledger, in a
|
Now install it:
|
||||||
subdirectory of your source tree named 'build' (which acprep will manage for
|
|
||||||
you, you simply need to create it):
|
|
||||||
|
|
||||||
$ mkdir build
|
|
||||||
$ ./acprep opt make
|
|
||||||
$ ./acprep debug make
|
|
||||||
|
|
||||||
Now install the optimized version:
|
|
||||||
|
|
||||||
$ cd build/ledger/opt
|
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
|
|
||||||
but know that you have 'build/ledger/debug' available for testing and
|
|
||||||
for more useful bug reports.
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
COMMON CONFIGURE/BUILD PROBLEMS
|
COMMON CONFIGURE/BUILD PROBLEMS
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
|
||||||
|
|
@ -1422,7 +1422,7 @@ increase compatibility with other text manipulation programs and
|
||||||
methods four additional comment characters are valid if used at the
|
methods four additional comment characters are valid if used at the
|
||||||
beginning of a line: @samp{#}, @samp{|}, and @samp{*} and @samp{%}.
|
beginning of a line: @samp{#}, @samp{|}, and @samp{*} and @samp{%}.
|
||||||
|
|
||||||
Block comments can be made by use @code{@!comment} ... @code{@!end
|
Block comments can be made by use @code{comment} ... @code{end
|
||||||
comment}.
|
comment}.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
|
@ -1432,10 +1432,10 @@ comment}.
|
||||||
| and this,
|
| and this,
|
||||||
* and this.
|
* and this.
|
||||||
|
|
||||||
!comment
|
comment
|
||||||
This is a block comment with
|
This is a block comment with
|
||||||
multiple lines
|
multiple lines
|
||||||
!end comment
|
end comment
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
There are several forms of comments within a transaction, for example:
|
There are several forms of comments within a transaction, for example:
|
||||||
|
|
@ -2000,7 +2000,7 @@ the account directive. For example:
|
||||||
@smallexample
|
@smallexample
|
||||||
apply account Personal
|
apply account Personal
|
||||||
2011/11/15 Supermarket
|
2011/11/15 Supermarket
|
||||||
Expenses:Groceries
|
Expenses:Groceries $ 50.00
|
||||||
Assets:Checking
|
Assets:Checking
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,21 @@
|
||||||
set(EMACS_LISP_SOURCES
|
set(EMACS_LISP_SOURCES
|
||||||
ldg-commodities.el
|
ledger-commodities.el
|
||||||
ldg-complete.el
|
ledger-complete.el
|
||||||
ldg-exec.el
|
ledger-exec.el
|
||||||
ldg-fonts.el
|
ledger-fonts.el
|
||||||
ldg-init.el
|
ledger-init.el
|
||||||
ldg-mode.el
|
ledger-mode.el
|
||||||
ldg-new.el
|
ledger-occur.el
|
||||||
ldg-occur.el
|
ledger-post.el
|
||||||
ldg-post.el
|
ledger-reconcile.el
|
||||||
ldg-reconcile.el
|
ledger-regex.el
|
||||||
ldg-regex.el
|
ledger-report.el
|
||||||
ldg-report.el
|
ledger-schedule.el
|
||||||
ldg-sort.el
|
ledger-sort.el
|
||||||
ldg-state.el
|
ledger-state.el
|
||||||
ldg-test.el
|
ledger-test.el
|
||||||
ldg-texi.el
|
ledger-texi.el
|
||||||
ldg-xact.el
|
ledger-xact.el)
|
||||||
ldg-context.el
|
|
||||||
ldg-schedule.el)
|
|
||||||
|
|
||||||
# find emacs and complain if not found
|
# find emacs and complain if not found
|
||||||
find_program(EMACS_EXECUTABLE emacs)
|
find_program(EMACS_EXECUTABLE emacs)
|
||||||
|
|
@ -30,7 +28,7 @@ macro(add_emacs_lisp_target el)
|
||||||
OUTPUT ${el}c
|
OUTPUT ${el}c
|
||||||
COMMAND ${EMACS_EXECUTABLE}
|
COMMAND ${EMACS_EXECUTABLE}
|
||||||
-L ${CMAKE_CURRENT_BINARY_DIR}
|
-L ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
-l ${CMAKE_CURRENT_BINARY_DIR}/ldg-regex.el
|
-l ${CMAKE_CURRENT_BINARY_DIR}/ledger-regex.el
|
||||||
-batch -f batch-byte-compile
|
-batch -f batch-byte-compile
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${el}
|
${CMAKE_CURRENT_BINARY_DIR}/${el}
|
||||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,9 @@ MOMENT is an encoded date"
|
||||||
(backward-paragraph 2)
|
(backward-paragraph 2)
|
||||||
(re-search-forward ledger-iso-date-regexp)
|
(re-search-forward ledger-iso-date-regexp)
|
||||||
(replace-match date)
|
(replace-match date)
|
||||||
(ledger-next-amount)))
|
(ledger-next-amount)
|
||||||
|
(if (re-search-forward "[-0-9]")
|
||||||
|
(goto-char (match-beginning 0)))))
|
||||||
|
|
||||||
(defun ledger-delete-current-transaction (pos)
|
(defun ledger-delete-current-transaction (pos)
|
||||||
"Delete the transaction surrounging point."
|
"Delete the transaction surrounging point."
|
||||||
|
|
|
||||||
|
|
@ -196,8 +196,8 @@ namespace {
|
||||||
|
|
||||||
for (const char * p = buf; *p; p++) {
|
for (const char * p = buf; *p; p++) {
|
||||||
if (*p == '.') {
|
if (*p == '.') {
|
||||||
if (commodity_t::time_colon_by_default ||
|
if (("h" == comm->symbol() || "m" == comm->symbol()) && (commodity_t::time_colon_by_default ||
|
||||||
(comm && comm->has_flags(COMMODITY_STYLE_TIME_COLON)))
|
(comm && comm->has_flags(COMMODITY_STYLE_TIME_COLON))))
|
||||||
out << ':';
|
out << ':';
|
||||||
else if (commodity_t::decimal_comma_by_default ||
|
else if (commodity_t::decimal_comma_by_default ||
|
||||||
(comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA)))
|
(comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA)))
|
||||||
|
|
@ -213,8 +213,8 @@ namespace {
|
||||||
out << *p;
|
out << *p;
|
||||||
|
|
||||||
if (integer_digits > 3 && --integer_digits % 3 == 0) {
|
if (integer_digits > 3 && --integer_digits % 3 == 0) {
|
||||||
if (commodity_t::time_colon_by_default ||
|
if (("h" == comm->symbol() || "m" == comm->symbol()) && (commodity_t::time_colon_by_default ||
|
||||||
(comm && comm->has_flags(COMMODITY_STYLE_TIME_COLON)))
|
(comm && comm->has_flags(COMMODITY_STYLE_TIME_COLON))))
|
||||||
out << ':';
|
out << ':';
|
||||||
else if (commodity_t::decimal_comma_by_default ||
|
else if (commodity_t::decimal_comma_by_default ||
|
||||||
(comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA)))
|
(comm && comm->has_flags(COMMODITY_STYLE_DECIMAL_COMMA)))
|
||||||
|
|
@ -744,7 +744,7 @@ void amount_t::in_place_unreduce()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shifted) {
|
if (shifted) {
|
||||||
if ("h" == comm->symbol() && commodity_t::time_colon_by_default) {
|
if (("h" == comm->symbol() || "m" == comm->symbol()) && commodity_t::time_colon_by_default) {
|
||||||
amount_t floored = tmp.floored();
|
amount_t floored = tmp.floored();
|
||||||
amount_t precision = tmp - floored;
|
amount_t precision = tmp - floored;
|
||||||
if (precision < 0.0) {
|
if (precision < 0.0) {
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ account_t * journal_t::register_account(const string& name, post_t * post,
|
||||||
// the payee indicates an account that should be used.
|
// the payee indicates an account that should be used.
|
||||||
if (result->name == _("Unknown")) {
|
if (result->name == _("Unknown")) {
|
||||||
foreach (account_mapping_t& value, payees_for_unknown_accounts) {
|
foreach (account_mapping_t& value, payees_for_unknown_accounts) {
|
||||||
if (value.first.match(post->xact->payee)) {
|
if (post && value.first.match(post->xact->payee)) {
|
||||||
result = value.second;
|
result = value.second;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,15 +69,4 @@ end tag
|
||||||
Income:Sales
|
Income:Sales
|
||||||
end tag
|
end tag
|
||||||
|
|
||||||
apply account Expenses
|
|
||||||
bucket Assets:Checking
|
|
||||||
2011/04/25 Tom's Used Cars
|
|
||||||
Auto $ 5,500.00
|
|
||||||
; :nobudget:
|
|
||||||
|
|
||||||
end account
|
|
||||||
apply payee Amazon.com B.*k Store
|
|
||||||
|
|
||||||
2011/04/27 Book Store
|
|
||||||
Books $20.00
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue