From 4707122eede9746b36bbaa0dab0b419e11b0433b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 21 Apr 2014 18:01:08 -0500 Subject: Initialize journal_t::no_aliases to false upon costruction This fixes a bug introduced by ecd5097d515f53703eb5dc6096da80182c452ad9. --- src/journal.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/journal.cc b/src/journal.cc index 804c9ee2..142b68a6 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -97,6 +97,7 @@ void journal_t::initialize() day_break = false; checking_style = CHECK_NORMAL; recursive_aliases = false; + no_aliases = false; } void journal_t::add_account(account_t * acct) -- cgit v1.2.3 From 4c4367fe6b7f184605c900735fc5b646f45311c1 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 21 Apr 2014 12:35:54 +0200 Subject: Fix Travis CI build - Install and use GNU GCC 4.8 to support required C++11 standard - Build Boost (1.55.0) libraries needed by ledger - Export build and cmake variables to find locally built Boost --- .travis.yml | 39 +++++++++++++++++++++++++++++++-------- acprep | 1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index eefc1859..29a4b246 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,41 @@ +# Since the Travis CI environment (URL) provides GNU GCC 4.6, which does not +# support -std=c++11 GNU GCC 4.8 is installed. Additionally boost 1.55.0 is +# compiled from source, since in the Travis CI environment only boost 1.46 is +# available and no backported package was found on the net. + language: cpp compiler: - clang - gcc + +before_install: + # Add software package repository, containing updated build toochain, i.e. GNU GCC 4.8 + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes + - sudo apt-get update -qq + # Download boost 1.55 and extract the source archive + - wget --no-verbose --output-document=boost-trunk.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download + - export BOOST_ROOT="$TRAVIS_BUILD_DIR/../boost-trunk" + - export CMAKE_MODULE_PATH="$BOOST_ROOT" + - mkdir -p $BOOST_ROOT + - tar jxf boost-trunk.tar.bz2 --strip-components=1 -C $BOOST_ROOT + install: - - "./acprep dependencies" - - wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download - - tar jxf download - - mv boost_1_55_0 $HOME/boost-trunk + # Install GNU GCC 4.8 required by use of C++11 + - sudo apt-get install -qq g++-4.8 gcc-4.8 + - export CXX="g++-4.8" CC="gcc-4.8" + # Build boost libraries required by ledger + - (cd $BOOST_ROOT; ./bootstrap.sh --with-libraries=date_time,filesystem,system,iostreams,regex,python,test) + - (cd $BOOST_ROOT; ./b2 threading=multi --prefix=$BOOST_ROOT -d0 install) + # Install further dependencies + - ./acprep dependencies + before_script: - - BOOST="$HOME/boost-trunk" - - "./acprep opt make --python" + - ./acprep opt make --python --boost=$BOOST_ROOT + script: - - "./acprep check -- --output-on-failure" - - "PYTHONPATH=. python python/demo.py" + - ./acprep check -- --output-on-failure + - PYTHONPATH=. python python/demo.py + notifications: email: on_success: change diff --git a/acprep b/acprep index dde3e62f..754a2427 100755 --- a/acprep +++ b/acprep @@ -868,6 +868,7 @@ class PrepareBuild(CommandLineApp): if self.options.boost_root: conf_args.append('-DBOOST_ROOT=%s' % self.options.boost_root) + conf_args.append('-DBoost_NO_SYSTEM_PATHS=TRUE') if self.options.boost_suffix: conf_args.append('-DBoost_COMPILER=%s' % self.options.boost_suffix) -- cgit v1.2.3 From 73c21a09e9a7996bc8d36d6966f70fb829c2c1b0 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Wed, 23 Apr 2014 13:26:25 +0200 Subject: Add URL to Travis CI environment documentation [ci skip] --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 29a4b246..b4999235 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ -# Since the Travis CI environment (URL) provides GNU GCC 4.6, which does not -# support -std=c++11 GNU GCC 4.8 is installed. Additionally boost 1.55.0 is -# compiled from source, since in the Travis CI environment only boost 1.46 is -# available and no backported package was found on the net. +# Since the Travis CI environment http://docs.travis-ci.com/user/ci-environment/ +# provides GNU GCC 4.6, which does not support -std=c++11 GNU GCC 4.8 is +# installed. Additionally boost 1.55.0 is compiled from source, since in the +# Travis CI environment only boost 1.46 is available and no backported package +# was found on the net. language: cpp compiler: -- cgit v1.2.3 From 9c3535823a8e9ba60a886f7f75532245da993c70 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 23 Apr 2014 17:07:23 +0100 Subject: improve C-c C-a (ledger-xact-insert-transaction) behaviour When the right place to add a transaction is after all existing transactions, add it just after the last transaction rather than at the end of the buffer. (Otherwise the transactions get added after Local Variables blocks and any other endmatter.) --- lisp/ledger-xact.el | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el index 35b0d62c..4eb88749 100644 --- a/lisp/ledger-xact.el +++ b/lisp/ledger-xact.el @@ -89,12 +89,20 @@ within the transaction." (defun ledger-xact-find-slot (moment) "Find the right place in the buffer for a transaction at MOMENT. MOMENT is an encoded date" - (catch 'found - (ledger-xact-iterate-transactions - (function - (lambda (start date mark desc) - (if (ledger-time-less-p moment date) - (throw 'found t))))))) + (let (last-xact-start) + (catch 'found + (ledger-xact-iterate-transactions + (function + (lambda (start date mark desc) + (setq last-xact-start start) + (if (ledger-time-less-p moment date) + (throw 'found t)))))) + (when (and (eobp) last-xact-start) + (let ((end (cadr (ledger-find-xact-extents last-xact-start)))) + (goto-char end) + (if (eobp) + (insert "\n") + (forward-line)))))) (defun ledger-xact-iterate-transactions (callback) "Iterate through each transaction call CALLBACK for each." -- cgit v1.2.3 From ad4eac43a99af8f6d88efefd8921fb71d7626de0 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 23 Apr 2014 17:04:19 +0100 Subject: add "year" handling to ledger-iterate-regex --- lisp/ledger-regex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el index 8d838892..3b43172d 100644 --- a/lisp/ledger-regex.el +++ b/lisp/ledger-regex.el @@ -325,7 +325,7 @@ (note end-note)) (defconst ledger-iterate-regex - (concat "\\(Y\\s-+\\([0-9]+\\)\\|" ;; Catches a Y directive + (concat "\\(\\(?:Y\\|year\\)\\s-+\\([0-9]+\\)\\|" ;; Catches a Y/year directive ledger-iso-date-regexp "\\([ *!]+\\)" ;; mark "\\((.*)\\)?" ;; code -- cgit v1.2.3 From e2d3e02b0d998a74b76f02f0f8e1fa3d5cd2df5e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 23 Apr 2014 17:43:43 +0100 Subject: fix ledger-iso-date-regex, abusing its name slightly the year field in dates is sort-of optional, given "year" or "Y" directives. Make the date regex understand this. (This has been lightly tested with C-c C-a, but the rest of the uses of ledger-iso-date-regex have only been eyeballed, not properly audited or tested) --- lisp/ledger-regex.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el index 3b43172d..91344523 100644 --- a/lisp/ledger-regex.el +++ b/lisp/ledger-regex.el @@ -178,8 +178,8 @@ (ledger-define-regexp iso-date ( let ((sep '(or ?- ?/))) (rx (group - (and (group (? (= 4 num))) - (eval sep) + (and (? (and (group (= 4 num))) + (eval sep)) (group (and num (? num))) (eval sep) (group (and num (? num))))))) -- cgit v1.2.3