I tried using a new init.el file on my Emacs so that I start with a fresh
initialization file without any of my personal customization.
I used the below contents in my init.el.

;; use init file as the one provided under --load-init
> (setq user-init-file (or load-file-name (buffer-file-name)))
> (setq user-emacs-directory (file-name-directory user-init-file))
> ;; setup ledger mode
> (add-to-list 'load-path (expand-file-name
> "~/.emacs.d/elpa/ledger-mode-20200530.1710/"))
> (require 'ledger-mode)
> (autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t)
> (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
> ;; some handy ledger mode hooks
> (add-hook 'ledger-mode-hook
>           (lambda ()
>                   (setq-local tab-always-indent 'complete)
>                   (setq-local completion-cycle-threshold t)
>                   (setq-local ledger-complete-in-steps t)
>                   (setq-local ledger-clear-whole-transaction t)


Note that I've used the ledger-mode elisp package downloaded from melpa.
You may find it here https://melpa.org/#/ledger-mode
With the init.el setup, I invoke emacs using the following command to load
this init.el file while invoking Emacs.

> emacs -q --load init.el


I wrote a sample example.ledger file for your reference

> 2019/10/23 * Opening Balance
>     Assets:Checking:bofa
>  $25.00
>     Liabilities:cc-visabofa
>  $0.00
>     Equity:
> 2020/07/26 * Salary
>     Income:Salary:biweekly
> -$1000.00
>     Assets:Checking:bofa
> 2020/07/28 * Ralphs Purchase
>     Expenses:Food:Grocery:ralphs
> $100.00
>     Assets:Checking:bofa
> 2020/07/28 * Vonns Shopping
>     Expenses:Food:Grocery:vonns
>  $200.00
>     Assets:Checking:bofa
> 2020/07/28 * Chevron Gas
>     Expenses:Transportation:Auto:Gas:chevron
>  $30.00

    Assets:Checking:bofa


With this example file, if I type in a new entry with C-c C-a, after the
date is added I type in * for indicating a "completed" transaction and then
if I type in V and tab it, it auto-completes to Vonns Shopping.
Hope you find this useful.

Thanks
Ghanashyam


On Tue, 28 Jul 2020 at 06:05, Oliver Hardy <ohardy...@gmail.com> wrote:

> I thank you for that but it still doesn't work. Company mode enabled,
> company mode disabled. Tab, no tab. Partial payee name, complete payee name.
> All I ever get is today's date with C-c C-a.
>
> In addition to being new to ledger I'm also new to emacs so I'm sure I'm
> making some simple beginner mistake.
>
> On Monday, July 27, 2020 at 11:39:47 PM UTC, Ghanashyam Prabhu wrote:
>>
>> On my Emacs setup, I have company mode enabled and typing a part of the
>> Payee automatically completes the Payee entry.
>> I tried disabling Company mode and typing in part of the Payee name, this
>> time I have to Tab to initiate completion.
>> Tabbing further then cycles through different existing Payees. I have the
>> following in my .emacs
>>
>> (add-hook 'ledger-mode-hook
>>     (lambda ()
>>         (setq-local tab-always-indent 'complete) ;; I guess this does the
>> job of completion of Payee Entries..
>>         (setq-local completion-cycle-threshold t)
>>         (setq-local ledger-complete-in-steps t)
>>         (setq-local ledger-clear-whole-transaction t)
>>     )
>> )
>>
>> - Ghanashyam
>>
>>
>> On Mon, 27 Jul 2020 at 13:02, Oliver Hardy <ohar...@gmail.com> wrote:
>>
>>> Following the ledger-mode docs, in emacs I do C-c C-a.  This brings up a
>>> calendar with today's date highlighted. I'm then instructed
>>> to type a close match to the payee. Hitting enter then enters the date
>>> in my ~/journal.ledger file and that's it. No further details even
>>> though the payee I'm entering appears several times through out the
>>> file.
>>>
>>> What am I doing Wrong?
>>>
>>> Thank you.
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Ledger" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ledge...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ledger-cli/17a37eb7-20ee-41ac-938e-973c27297b9co%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ledger-cli/17a37eb7-20ee-41ac-938e-973c27297b9co%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/77cbc79c-0bbd-4396-aa01-8da11bc1f422o%40googlegroups.com
> <https://groups.google.com/d/msgid/ledger-cli/77cbc79c-0bbd-4396-aa01-8da11bc1f422o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CABieCERH-LezBCQAjXrCv-v6tHEEjjj4w7f6%3Dn1Uiirw9OxV6g%40mail.gmail.com.

Reply via email to