Commit graph

558 commits

Author SHA1 Message Date
thdox
f5ba76442c [emacs] Fix bug 1060.
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]
2015-04-05 16:00:15 +02:00
thdox
8162cc783d [emacs] C-x h M-x untabify RET
C-x h M-x indent-region RET

[ci skip]
2015-02-10 21:42:50 +01:00
thdox
c278e91346 Add prefix ledger-reconcile- to s-functions to not conflict with
original s.el
2015-01-21 10:50:27 +01:00
thdox
12c563614c Add documentation for bugzilla #1105, and align documentation between
ledger-reconcile.el and ledger-mode.texi.
2015-01-21 10:50:24 +01:00
thdox
eb9672c550 Fix for bugzilla #1105.
You can now maximize the number of characters displayed for payee name
and account name in the reconcile buffer.
2015-01-21 10:50:20 +01:00
Marco Wahl
561ec047be [emacs] fix copy
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.
2015-01-18 13:33:26 +01:00
Konstantin Nazarov
c98af897f7 [emacs] Fontification should work independentily on where the point currently is
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]
2015-01-11 02:33:10 +03:00
Hans Erik van Elburg
5ff724c451 ledger-mode bug 1089 introduce sticky cursor for report auto refresh 2015-01-04 22:46:26 +01:00
Craig Earls
2c277112b6 [emacs] maintain the report order after auto-refresh. 2015-01-02 13:07:55 -07:00
Craig Earls
7cd3a7fc9d Merge commit '8e79b3c7c74081b63f9d8b1e0ec97478f61d4ba8' 2014-12-30 20:48:52 -08:00
Alexis Hildebrandt
1dd9dcaab4 Bump copyright notice to 2015
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}/"
2014-12-27 11:24:55 +01:00
Steve Purcell
833f66d30e [emacs] Don't define unprefixed "string-empty-p" function 2014-12-18 12:56:31 +00:00
Craig Earls
b6cef4bc50 Merge branch 'master' of https://github.com/ledger/ledger 2014-12-16 20:30:12 -07:00
Craig Earls
af8767c9ab [emacs] Correct header in ledger-occur. No functional change. 2014-12-16 20:28:35 -07:00
Steve Purcell
5717a03e3b [emacs] Make ledger-occur-mode auto-disable when restored by desktop.el
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.
2014-12-16 08:41:53 +00:00
Craig Earls
c1a7281594 Fix ledger-schedule-upcoming so that is honor input file names. 2014-12-14 09:28:24 -07:00
Steve Purcell
d0e09f1d93 [emacs] Add a menu entry for turning off ledger-occur-mode 2014-12-13 20:31:51 +00:00
Steve Purcell
b810862bf1 [emacs] define-derived-mode calls set-syntax-table automatically 2014-12-13 17:20:52 +00:00
Steve Purcell
b0ab334ddf [emacs] Add syntax table so that ";" comments are handled
This allows things like goto-address-prog-mode to correctly
highlight URLs inside comments.
2014-12-13 17:15:44 +00:00
Steve Purcell
b960eec520 [emacs] Restore toggle behaviour of ledger-occur command, for menu users 2014-12-10 16:28:53 +00:00
Steve Purcell
e16e601435 [emacs] Turn ledger-occur-mode off via a separate command, and allow refreshing 2014-12-10 09:37:20 +00:00
Steve Purcell
637679c0cb [emacs] Fix more byte compilation and other layout issues 2014-12-10 09:17:32 +00:00
Steve Purcell
233ece62cd [emacs] Declare when we're using cl 2014-12-09 21:19:35 +00:00
Steve Purcell
68574f8f59 [emacs] Don't use setq-local, which only appeared in Emacs 24.4
/cc @enderw88
2014-12-09 21:13:57 +00:00
Steve Purcell
0fb064443d [emacs] Simplify and tidy up ledger-occur
Introducing a proper minor mode saves a lot of the hand-rolled fiddling
about, like managing the overlay lifecycle and the modeline.
2014-12-09 21:01:44 +00:00
Steve Purcell
233313fb17 [emacs] Fix byte compilation warnings 2014-12-09 19:38:00 +00:00
Steve Purcell
7579057bc0 [emacs] Set comment-start to ";" so that comment-dwim works 2014-12-09 16:29:45 +00:00
Steve Purcell
01c91130d7 [emacs] Parse transaction leading lines more robustly
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.
2014-12-09 16:26:51 +00:00
Steve Purcell
b623306591 [emacs] Use markers instead of raw positions to make cleaning work better
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.
2014-12-09 15:11:44 +00:00
Steve Purcell
c8dd5d4a0a [emacs] When the first line is a txn, include it in ledger-sort-buffer
Without this fix, ledger-sort-region tends to skip the first
transaction when sorting a region or the entire buffer.
2014-12-09 14:40:39 +00:00
Steve Purcell
7a0b004f9d Use font-lock-preprocessor-face as the basis for directive faces 2014-12-09 12:48:19 +00:00
Alok Parlikar
eeb120f5e4 ledger-regex: Indian Rupee Symbol
Added the ₹ symbol to ledger-amount-regex
2014-12-07 21:42:31 -05:00
Craig Earls
2f0dcec10e Make sure there is alive window to switch back to when quitting reconcile buffer 2014-12-07 12:15:15 -07:00
Craig Earls
dedc6c7061 ooops. 2014-12-06 17:39:53 -07:00
Craig Earls
b5fa7d2443 Add tangle expansion and correct menu entry for edit report. 2014-12-06 17:28:03 -07:00
Craig Earls
8848834d7d Merge commit '30df70ab1b02a05b4fc1198c932c4536dd480ef1' 2014-12-05 21:31:21 -07:00
Craig Earls
a5d4d780dc Make reconcile more robust to empty or bad account entries at the prompt. 2014-12-05 21:30:29 -07:00
Steve Purcell
30df70ab1b Don't hard-code ledger-font-default-face to black 2014-12-05 16:22:55 +00:00
Craig Earls
3d179c4213 Merge branch 'master' of https://github.com/ledger/ledger 2014-12-05 07:01:02 -07:00
Craig Earls
df88ee6189 Tweak ledger-clean-up to attempt to find the exact you were at when you ordered the clean. 2014-12-05 06:59:57 -07:00
Steve Purcell
def0a8421d Inherit standard font lock faces where appropriate 2014-12-05 09:41:00 +00:00
Craig Earls
bb38cda880 Adjust navigate-find-end-of-act so that it will sort empty act.
This is a bit pathological but as it turns out the fix makes all sorting a bit faster.
2014-12-04 19:47:43 -07:00
Craig Earls
6853aa6726 Don't bomb out if the occur reggae has no matches. 2014-12-03 20:40:12 -07:00
Craig Earls
f238d993fb Fix change I accidentally committed when trying to fix reconcile in frames. 2014-12-02 18:45:04 -07:00
Craig Earls
f981ec7884 Another fonitification fix. and clean up a stray reference to function removed. 2014-12-02 18:06:41 -07:00
Craig Earls
eba603293b Adjust payee line fortification. 2014-12-02 06:30:41 -07:00
Craig Earls
c844170aed Doc string cleanup. 2014-12-01 20:18:11 -07:00
Craig Earls
66d2e4fecd Doc string cleanup. 2014-12-01 20:07:46 -07:00
Craig Earls
438aaf251c Fix effective date command. 2014-12-01 20:07:32 -07:00
Craig Earls
8f9c46d42b Merge branch 'master' into ledger-mode-code-cleanup 2014-12-01 19:31:56 -07:00