From da3852edd7ab66a82c226b34b138b41f9be7b5d5 Mon Sep 17 00:00:00 2001 From: David Keegan Date: Mon, 28 Oct 2013 08:38:39 +0000 Subject: [PATCH] WIP: Initialisation. --- dklrt.el | 9 ++++----- dklrt.texi | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dklrt.el b/dklrt.el index fccc29c..47e42ff 100755 --- a/dklrt.el +++ b/dklrt.el @@ -39,13 +39,12 @@ positioned by date.") ;DkTbd: (or dklrt-PackageDirectory - (setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131021.2244/")) + (setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131028.821/")) -(defun dklrt-SetKeysAndAppendRecurringMaybe() -"Bind \C-cr to dklrt-AppendRecurring and call dklrt_AppendRecurringMaybe. +(defun dklrt-SetCcKeys() +"Bind \C-cr to dklrt-AppendRecurring. To invoke, add this function to ledger-mode-hook." - (define-key (current-local-map) "\C-cr" 'dklrt-AppendRecurring) - (dklrt-AppendRecurringMaybe)) + (define-key (current-local-map) "\C-cr" 'dklrt-AppendRecurring)) (defun dklrt-AppendRecurringMaybe() "Call dklrt_AppendRecurring(), but only if appropriate." diff --git a/dklrt.texi b/dklrt.texi index 72f4b0d..603a429 100644 --- a/dklrt.texi +++ b/dklrt.texi @@ -87,6 +87,20 @@ Foundation GNU Free Documentation Licence. @node Getting Started @section Getting Started +To append recurring transactions on entry to ledger-mode, +add this line to your emacs profile: + +@lisp +(add-hook 'ledger-mode-hook 'dklrt-AppendRecurringMaybe) +@end lisp + +To bind \C-cr to dklrt-AppendRecurring in ledger-mode only, +add this line to your emacs profile (optional). + +@lisp +(add-hook 'ledger-mode-hook 'dklrt-SetCcKeys) +@end lisp + @node Known Issues @section Known Issues