-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M-q, fill-paragraph, like ledger-mode #28
Comments
It definitely makes sense to fix it. Feel free to raise a PR. :) |
I would appreciate a similar feature too. |
IMO hledger-mode shouldn't implement this. That should be handled by Emacs' built-in alignment functions. Here's an alignment rule that will align amounts correctly. After adding it, you can select the whole buffer and run (add-to-list 'align-rules-list
`(hledger-accounts
(regexp . ,(rx (+ space)
(+? anything)
(group-n 1 space (+ space)
(? ?-)
(+ digit)
(? ?.)
(* digit))))
(group . 1)
(spacing . 2)
(justify . t)
(separate . entire)
(modes . '(hledger-mode)))) |
Thank you @jakecoble for the helpful comment. I think it still makes sense to add the value you shared to the list of |
We might as well reimplement the rest of hledger in our own init files, then. The whole point of a package like this is to provide sane defaults. |
In ledger-mode, if user presses M-q, it will clean up the "paragraph", that is, it will realign amounts, etc.
Would this be a good feature for hledger-mode? Users may be bringing in data added by other ledger data entry tools (like my mobile app), and may want to clean up their data once they're back at desktop. (I would put amounts all at the same column in my app, but currently, the view does not parse and present transactions in a formatted way, so I try to input the columns to a minimum for now.)
The text was updated successfully, but these errors were encountered: