tab completion in ledger-mode

47 views
Skip to first unread message

Pascal Fleury

unread,
Dec 28, 2020, 11:08:35 AM12/28/20
to ledge...@googlegroups.com
Hello,

I just upgraded to ledger-mode 4.0.0 and was bitten by the change in tab completion.
I did find information about how to set it "back" to the way it was before, alas it's not. My source was through this issue (https://github.com/ledger/ledger-mode/issues/178) to the docs that tell me to add

(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)))

to my config. This is an improvement, but it falls back to helm and makes the selection from a separate temporary buffer.
Prior, selection of e.g. "Dépenses:Maison:Divers" and "Actif:Caisse:CP Courant"
D<tab><tab>:<tab>:<tab><tab><space><amount>
A<tab>:C<tab>:CP<space>c<tab><space><amount>

Account selection is essentially the <tab> and the ':' keys.

All of this is very predictable given my account structure, and I do not need to go to another buffer and check that it got the right list. Also, it's always the same key.

Now (with helm) I get
D<tab><down><return>M<tab><return>D<tab><space><amount>
A<tab>C<tab>CP<tab><down><return><space><amount>

Many keys involved, and confirmation of action is somewhere else on the screen. I find this far less efficient and hindering me entering fast transactions.

Question: what was the completion framework before ? And can this be setup just for ledger-mode ?

Thanks,
Pascal


Reply all
Reply to author
Forward
0 new messages