summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-0217-17/+17
| | | | [ci skip]
* Merge pull request #436 from Fuco1/fix-context-amount-regexpJohn Wiegley2015-10-261-2/+2
|\ | | | | Fix amount regexp in context computation.
| * Fix separator and amount regexp in context computation.Matus Goljer2015-10-091-2/+2
| | | | | | | | | | | | | | | | | | Before the fix the amount required decimal point even when the decimal digits were optional. Now both are optional. The separator regexp didn't have capture group so all the further fields shifted one field back (amount went into separator, commodity into amount etc.)
* | Add an option to change amount-alignment mode.Matus Goljer2015-10-141-1/+15
|/ | | | | | | Make the default alignment behaviour the same as before 767ab3e, that is, align on the last digit by default. A new option `ledger-post-amount-alignment-at' now exists to adjust alignment preference.
* Make balance-at-point able to convert commodity.Matus Goljer2015-10-011-4/+9
| | | | | The function `ledger-display-balance-at-point' called with the prefix argument will now ask for the target commodity.
* Add function to read commodity from the user.Matus Goljer2015-10-011-0/+10
| | | | | The function provides completing read with all available commodities as gathered by "ledger commodities".
* Align amounts on the decimal separator.Matus Goljer2015-09-282-4/+9
| | | | | | | | | That is: A $10.00 B $5 C -$15.00 Before the numbers aligned at the end of the last digit.
* Merge pull request #433 from Fuco1/improve-align-dwimSimon Michael2015-09-211-4/+10
|\ | | | | Fill comment paragraph with ledger-post-align-dwim
| * Fill comment paragraph with ledger-post-align-dwimMatus Goljer2015-09-211-4/+10
| | | | | | | | | | In addition to re-aligning postings, if the point is in a comment, just fill that comment as regular plaintext.
* | Fix amount-regex to properly capture integer part.Matus Goljer2015-09-211-2/+2
|/ | | | | | | | | | | If the integer part was 2 digits, because the integer part was non-greedy, it only captured as much as necessary, namely one digit. The other digit was captured by the 5th group's [:word:] not 4th because that one is also optional. This results in incorrect reporting of amount length and broken aligning. Also move the decimal dot matching from 3rd group to 4th, and quote the dot.
* Bind M-q to ledger-post-align-dwim.Matus Goljer2015-09-191-0/+1
| | | | | There is very little reason to have M-q bound to fill-paragraph in ledger, so let's use it for aligning instead.
* Add a function to "dwim" align.Matus Goljer2015-09-191-0/+7
| | | | | If no region is active, align the current transaction. If a region is active, align all postings in the region.
* fontify recurring transaction in ledger-mode [ci skip]paulbdavis2015-09-183-2/+19
|
* Fix xact-find-slot at end of bufferAndrew Schwartzmeyer2015-08-221-3/+2
| | | | | | | | | | | | | | | | | | | | Using `ledger-add-transaction` to add a transaction with a date that places it at the end of the buffer will "forget" to insert the newline between it and the previous transaction. This error occurs in `ledger-xact-find-slot` where the `(when (and (eobp) last-xact-start)` is entered, but subsequently the `(if (eobp))` is false because the point has been moved to the end of the prior exact, which is not the end of the buffer. The `if` expression is superfluous because the `when` expression has already been entered, and it is broken becase the point gets moved. Removing it fixes the behavior for transactions added at the end of the buffer, and does not break the behavior for transactions added elsewhere. This was observed with Emacs 24.5.50.1 and Ledger 3.1.0-20141005. [ci skip]
* Fix ledger-magic-tab: Wrong number of argumentsKan-Ru Chen2015-06-281-1/+1
| | | ledger-post-align-postings expects (beg end) not to be optional
* Use (interactive "r") in ledger-post-align-postingsErik Hetzner2015-05-311-11/+3
| | | | | Use standard method (interactive "r") to get the current active region for use in ledger-post-align-postings.
* Merge pull request #411 from thdox/bug-1060Craig Earls2015-04-051-2/+8
|\ | | | | [emacs] Fix bug 1060.
| * [emacs] Fix bug 1060.thdox2015-04-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set as an option to kill (or not) the reconcile buffer after ledger-reconcile-finish. The default is set to *not* kill the buffer. This is justified as the facts that: 1. In old ledger mode (the one from Ledger 2.6), the default is to *not* kill the buffer. Also for the ones who will migrate from 2.6 to 3 when package will be available in their linux distribution, this will be the path of least surprise. 2. The current documentation does state that the buffer is to be killed with 'q' after 'C-c C-c'. This has been made configurable, as killing buffer may already be part of the workflow of some persons. [ci skip]
* | [emacs] Fix bug 1108, enabling correct account context.thdox2015-03-231-2/+2
|/ | | | | | | | The old way of working was keeping spaces before and after the account. Now the space before is associated to the "status" and "separator" is enlarged to not be maxed to 2 chars [ci skip]
* [emacs] C-x h M-x untabify RETthdox2015-02-1016-497/+497
| | | | | | C-x h M-x indent-region RET [ci skip]
* Add prefix ledger-reconcile- to s-functions to not conflict withthdox2015-01-211-6/+7
| | | | original s.el
* Add documentation for bugzilla #1105, and align documentation betweenthdox2015-01-211-12/+12
| | | | ledger-reconcile.el and ledger-mode.texi.
* Fix for bugzilla #1105.thdox2015-01-211-9/+61
| | | | | You can now maximize the number of characters displayed for payee name and account name in the reconcile buffer.
* [emacs] fix copyMarco Wahl2015-01-181-0/+1
| | | ledger-xact.el:ledger-copy-transaction-at-point (C-c C-k) led to a confusing change in the ledger file for the case when the target date was smaller than last date in the ledger.
* [emacs] Fontification should work independentily on where the point currently isKonstantin Nazarov2015-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a subtle bug that happens only when org-src-fontify-natively is enabled: (setq org-src-fontify-natively t) If then you create a Babel block with ledger text, it won't be fontified. This happens because the 'ledger-fontify-buffer-part' starts fontification from the current 'point', which in case of org-src-font-lock-fontify-block happens to _not_ point to the beginning of buffer. Instead it points to the original org-mode buffer. This doesn't happen when one opens regular files, because the 'point' is almost always at the beginning of the file. To reproduce the bug, you can do the following: (defun fontify-test() (let ((lang-mode 'ledger-mode) pos next) (with-current-buffer (get-buffer-create "ledger-fontification-bug") (unless (eq major-mode lang-mode) (funcall lang-mode)) (erase-buffer) (insert "2015/01/09 asdf\n foo\n bar\n" " ") (font-lock-fontify-buffer) (switch-to-buffer "ledger-fontification-bug") ))) Call 'fontify-test' and see that the buffer is not fontified. [ci skip]
* ledger-mode bug 1089 introduce sticky cursor for report auto refreshHans Erik van Elburg2015-01-041-0/+8
|
* [emacs] maintain the report order after auto-refresh.Craig Earls2015-01-021-3/+12
|
* Merge commit '8e79b3c7c74081b63f9d8b1e0ec97478f61d4ba8'Craig Earls2014-12-3017-22/+22
|\
| * Bump copyright notice to 2015Alexis Hildebrandt2014-12-2717-17/+17
| | | | | | | | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
| * [emacs] Don't define unprefixed "string-empty-p" functionSteve Purcell2014-12-181-5/+5
| |
* | Merge branch 'master' of https://github.com/ledger/ledgerCraig Earls2014-12-161-1/+1
|\|
| * [emacs] Make ledger-occur-mode auto-disable when restored by desktop.elSteve Purcell2014-12-161-1/+1
| | | | | | | | | | | | | | The minor mode gets restored by desktop.el, and this has long caused errors. While the ideal would be to restore the mode along with the current narrowing regexp, this interim fix instead ensures that ledger-occur-mode will disable itself if it finds no regexp set.
* | [emacs] Correct header in ledger-occur. No functional change.Craig Earls2014-12-161-1/+1
|/
* Fix ledger-schedule-upcoming so that is honor input file names.Craig Earls2014-12-141-3/+3
|
* [emacs] Add a menu entry for turning off ledger-occur-modeSteve Purcell2014-12-132-7/+6
|
* [emacs] define-derived-mode calls set-syntax-table automaticallySteve Purcell2014-12-131-1/+0
|
* [emacs] Add syntax table so that ";" comments are handledSteve Purcell2014-12-131-1/+8
| | | | | This allows things like goto-address-prog-mode to correctly highlight URLs inside comments.
* [emacs] Restore toggle behaviour of ledger-occur command, for menu usersSteve Purcell2014-12-101-8/+6
|
* [emacs] Turn ledger-occur-mode off via a separate command, and allow refreshingSteve Purcell2014-12-101-11/+27
|
* [emacs] Fix more byte compilation and other layout issuesSteve Purcell2014-12-102-1/+18
|
* [emacs] Declare when we're using clSteve Purcell2014-12-091-0/+1
|
* [emacs] Don't use setq-local, which only appeared in Emacs 24.4Steve Purcell2014-12-091-7/+7
| | | | /cc @enderw88
* [emacs] Simplify and tidy up ledger-occurSteve Purcell2014-12-093-71/+39
| | | | | Introducing a proper minor mode saves a lot of the hand-rolled fiddling about, like managing the overlay lifecycle and the modeline.
* [emacs] Fix byte compilation warningsSteve Purcell2014-12-094-24/+39
|
* [emacs] Set comment-start to ";" so that comment-dwim worksSteve Purcell2014-12-091-0/+1
|
* [emacs] Parse transaction leading lines more robustlySteve Purcell2014-12-093-27/+30
| | | | | | This began with noticing that the code didn't support the (ugly, yet valid) case of a tab between the date and txn description. I took the opportunity to make the regexes more consistent along the way.
* [emacs] Use markers instead of raw positions to make cleaning work betterSteve Purcell2014-12-092-60/+56
| | | | | | | Sometimes cleaning a buffer would leave the end of the buffer uncleaned, because the end position would be moved along the way. This commit makes the corresponding code use markers instead, which track the changes in the buffer, and therefore ensure that the entire buffer is acted upon.
* [emacs] When the first line is a txn, include it in ledger-sort-bufferSteve Purcell2014-12-091-0/+2
| | | | | Without this fix, ledger-sort-region tends to skip the first transaction when sorting a region or the entire buffer.
* Use font-lock-preprocessor-face as the basis for directive facesSteve Purcell2014-12-091-1/+1
|
* ledger-regex: Indian Rupee SymbolAlok Parlikar2014-12-071-2/+2
| | | Added the ₹ symbol to ledger-amount-regex