Re: [emacs] using ledger-mode for beancount

2019-06-03 Thread Daniele Nicolodi
On 02-06-2019 18:26, Martin Blais wrote: > Another strange thing: when I press ENTER at the end of a line, the > amount automatically indents itself... > Personally I find that annoying (especially if there are cases it will > get it wrong), I think it should be optional. This behavior is defined

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
I just updated the pull request with the fix, unless I messed up fix mercurial again, I rewrote the history to contain the fix. On 02/06/2019 19:25, Martin Blais wrote: > Just add it on top and I'll reimport from scratch > > > On Sun, Jun 2, 2019 at 9:17 PM Daniele Nicolodi

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
I just noticed that my beancount repository on bitbucket also has two heads... I need to fix that as well. Apparently `hg push --force` does not do the same thing as `git push --force`... On 02/06/2019 19:25, Martin Blais wrote: > Just add it on top and I'll reimport from scratch > > > On Sun,

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Just add it on top and I'll reimport from scratch On Sun, Jun 2, 2019 at 9:17 PM Daniele Nicolodi wrote: > On 02/06/2019 18:32, Daniele Nicolodi wrote: > > On 02/06/2019 18:24, Martin Blais wrote: > >> Another issue: The account completion seems broken ; the list of account > >> is in

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 18:32, Daniele Nicolodi wrote: > On 02/06/2019 18:24, Martin Blais wrote: >> Another issue: The account completion seems broken ; the list of account >> is in beancount-accounts is empty and I can't insert an account name. > > That must have broken in the refactoring. I'm on it. I

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 18:24, Martin Blais wrote: > Another issue: The account completion seems broken ; the list of account > is in beancount-accounts is empty and I can't insert an account name. That must have broken in the refactoring. I'm on it Cheers, Dan -- You received this message because you

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Another strange thing: when I press ENTER at the end of a line, the amount automatically indents itself... Personally I find that annoying (especially if there are cases it will get it wrong), I think it should be optional. On Sun, Jun 2, 2019 at 8:24 PM Martin Blais wrote: > Another issue:

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Another issue: The account completion seems broken ; the list of account is in beancount-accounts is empty and I can't insert an account name. On Sun, Jun 2, 2019 at 8:10 PM Martin Blais wrote: > On Sun, Jun 2, 2019 at 7:05 PM Daniele Nicolodi > wrote: > >> On 02/06/2019 16:16, Martin Blais

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
On Sun, Jun 2, 2019 at 7:05 PM Daniele Nicolodi wrote: > On 02/06/2019 16:16, Martin Blais wrote: > > Thanks Dan, > > I fixed most of the issues I had with these changes: > > Nice! Which issues do remain? > Give me a few days to run this myself and see if I encounter anything, then I'll merge.

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 16:16, Martin Blais wrote: > Thanks Dan, > I fixed most of the issues I had with these changes: Nice! Which issues do remain? > (require 'beancount) > (setq beancount-outline-regexp "\\*+ ") Yeah, I forgot to escape the * in the regexp... > (define-key* beancount-mode-map

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Thanks Dan, I fixed most of the issues I had with these changes: (require 'beancount) (setq beancount-outline-regexp "\\*+ ") (define-key* beancount-mode-map [(control c)(control n)] 'outline-next-visible-heading) (define-key* beancount-mode-map [(control c)(control p)]

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 15:39, Martin Blais wrote: > Also, TAB seems not to work as previously; with org-mode I used to be > able to toggle this way. > Now TAB invokes completion. > > Do you have a config setup I could try that keeps the bindings close to > what they used to be, at least for tab and moving

Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Just spent a half-hour trying to get outline-minor-mode with it, I can't get the basics to work. I keep getting this error: outline-back-to-heading: Before first heading On Sat, Jun 1, 2019 at 9:20 PM Martin Blais wrote: > Yes, just need a bit of time to review and test out the CL. > Maybe

Re: [emacs] using ledger-mode for beancount

2019-06-01 Thread Martin Blais
Yes, just need a bit of time to review and test out the CL. Maybe Tomorrow. (Limited cycles.) On Sat, Jun 1, 2019 at 8:20 PM Daniele Nicolodi wrote: > On 19/05/2019 17:45, Daniele Nicolodi wrote: > > On 31/03/2019 06:15, Stefano Zacchiroli wrote: > >> On Sun, Mar 17, 2019 at 05:41:16PM -0600,

Re: [emacs] using ledger-mode for beancount

2019-06-01 Thread Daniele Nicolodi
On 19/05/2019 17:45, Daniele Nicolodi wrote: > On 31/03/2019 06:15, Stefano Zacchiroli wrote: >> On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote: >>> I would like to upstream my changes, however, now that I know how I >>> would like the code to look like at the end, I would need

Re: [emacs] using ledger-mode for beancount

2019-05-22 Thread Daniele Nicolodi
On 22-05-2019 06:31, micah anderson wrote: > Daniele Nicolodi writes: > >> On 31/03/2019 06:15, Stefano Zacchiroli wrote: >>> On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote: I would like to upstream my changes, however, now that I know how I would like the code to

Re: [emacs] using ledger-mode for beancount

2019-05-22 Thread micah anderson
Daniele Nicolodi writes: > On 31/03/2019 06:15, Stefano Zacchiroli wrote: >> On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote: >>> I would like to upstream my changes, however, now that I know how I >>> would like the code to look like at the end, I would need to break up >>> my

Re: [emacs] using ledger-mode for beancount

2019-05-19 Thread Daniele Nicolodi
On 31/03/2019 06:15, Stefano Zacchiroli wrote: > On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote: >> I would like to upstream my changes, however, now that I know how I >> would like the code to look like at the end, I would need to break up >> my changes in a patchset and submit

Re: [emacs] using ledger-mode for beancount

2019-03-31 Thread Josh Slater
Just wanted to chime in that I’ve been using ledger-mode with outline mode for folding on top of beancount files and it works well enough for me, with some of the caveats in this thread. Would welcome a beancount major mode! -- You received this message because you are subscribed to the Google

Re: [emacs] using ledger-mode for beancount

2019-03-31 Thread Stefano Zacchiroli
On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote: > I would like to upstream my changes, however, now that I know how I > would like the code to look like at the end, I would need to break up > my changes in a patchset and submit if for inclusion. This would > require some time

Re: [emacs] using ledger-mode for beancount

2019-03-17 Thread Stefan Monnier
> I would like to upstream my changes, however, now that I know how I > would like the code to look like at the end, I would need to break up my > changes in a patchset and submit if for inclusion. This would require > some time investment. I haven't seen any interested from Martin about > those

Re: [emacs] using ledger-mode for beancount

2019-03-17 Thread Daniele Nicolodi
On 17/03/2019 14:17, Stefano Zacchiroli wrote: > On Sun, Jan 20, 2019 at 07:36:13PM -0700, Daniele Nicolodi wrote: >> Please test and let me know. > > I understand it's embarrassingly late to get back to you with feedback, > but I only got around playing with the changes you described now. The >

Re: [emacs] using ledger-mode for beancount

2019-01-23 Thread Daniele Nicolodi
On 23/01/2019 11:40, Stefan Monnier wrote: >> problem you were seeing. What I would like to do now is to get rid of >> the need for beancount-init-accounts > > Yes, please. > >> but I am afraid completion would slow down considerably in very >> large buffers. > > If needed, judicious use of

Re: [emacs] using ledger-mode for beancount

2019-01-23 Thread Stefan Monnier
> problem you were seeing. What I would like to do now is to get rid of > the need for beancount-init-accounts Yes, please. > but I am afraid completion would slow down considerably in very > large buffers. If needed, judicious use of caching should do the trick. Stefan -- You

Re: [emacs] using ledger-mode for beancount

2019-01-20 Thread Daniele Nicolodi
On 20/01/2019 19:36, Daniele Nicolodi wrote: > I changed the customization variable names to > > beancount-transaction-indent > beancount-number-alignment-column > > which seem more descriptive (and a bit shorter). I forgot to mention that to obtain automatic alignment column determination now

Re: [emacs] using ledger-mode for beancount

2019-01-20 Thread Daniele Nicolodi
Hi Stefano, I just commit another round of updated. On 20/01/2019 09:26, Stefano Zacchiroli wrote: > On Sat, Jan 19, 2019 at 10:59:36PM -0700, Daniele Nicolodi wrote: > I was initially surprised that the function doesn't also align each line > of the transaction before aligning the amounts

Re: [emacs] using ledger-mode for beancount

2019-01-20 Thread Stefano Zacchiroli
On Sun, Jan 20, 2019 at 09:32:24AM -0700, Daniele Nicolodi wrote: > (setq beancount-posting-alignment-column 4) Nice :-) -- Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o Computer Science Professor . CTO Software Heritage . . . . . o . . . o o Former Debian Project

Re: [emacs] using ledger-mode for beancount

2019-01-20 Thread Daniele Nicolodi
On 20/01/2019 09:26, Stefano Zacchiroli wrote: > Since we're talking about customizability, it would be nice to have a > local variable to set the desired amount of indentation. I know > beancount goes for 2 spaces by default, but I currently use 4, for > consistency with ledger. YMMV. It is

Re: [emacs] using ledger-mode for beancount

2019-01-20 Thread Stefano Zacchiroli
On Sat, Jan 19, 2019 at 10:59:36PM -0700, Daniele Nicolodi wrote: > I have now re-implemented number alignment. It is automatically > triggered on newline and on tab. I also implemented > beancount-align-transaction that you can bind to C-C C-q to obtain the > ledger-mode functionality. I've

Re: [emacs] using ledger-mode for beancount

2019-01-19 Thread Daniele Nicolodi
Ciao Stefano, On 04/01/2019 06:25, Stefano Zacchiroli wrote: >> Which functionalities do you miss the most in beancount-mode? > > - number alignment: I'm missing ledger-mode's equivalent of C-c C-q. > beancount-align-numbers is supposed to do that (well, I guess), but: > > - it doesn't work

Re: [emacs] using ledger-mode for beancount

2019-01-19 Thread Júlio Maranhão
On Friday, 18 January 2019 21:10:44 UTC-2, Daniele Nicolodi wrote: > orgstruct-mode has been deprecated and removed from org 9.2. I tried > outshine https://github.com/alphapapa/outshine ... Indeed, the org 9.2 relnotes (https://orgmode.org/Changes.html) tells "OrgStruct minor mode and radio

Re: [emacs] using ledger-mode for beancount

2019-01-19 Thread Daniele Nicolodi
Ciao Stefano, On 19/01/2019 09:09, Stefano Zacchiroli wrote: > Account completion works perfectly for me now. Ditto for indentation. > > The only glitch I've noticed is in the interaction between the two. > Consider the case of a badly indented line: you hit TAB on it and it > gets properly

Re: [emacs] using ledger-mode for beancount

2019-01-19 Thread Stefano Zacchiroli
Ciao Daniele, On Thu, Jan 17, 2019 at 04:19:14PM -0700, Daniele Nicolodi wrote: > I found some time to hack on beancount-mode. You can find the progress > here > https://bitbucket.org/daniele/beancount/src/default/editors/emacs/beancount.el great work! thanks a lot for this, more detailed

Re: [emacs] using ledger-mode for beancount

2019-01-18 Thread Daniele Nicolodi
Hello, orgstruct-mode has been deprecated and removed from org 9.2. I tried outshine https://github.com/alphapapa/outshine and it works fine on a fundamental-mode + beancount-mode buffer, it just requires headlines to be written prefixed by four semicolons, as * Foo ** Bar I think

Re: [emacs] using ledger-mode for beancount

2019-01-17 Thread Daniele Nicolodi
Hi Stefano, I found some time to hack on beancount-mode. You can find the progress here https://bitbucket.org/daniele/beancount/src/default/editors/emacs/beancount.el (unfortunately I botched the split of my changes in independent patches, I'll probably rewrite history at some point) I

Re: [emacs] using ledger-mode for beancount

2019-01-14 Thread Júlio Maranhão
On Friday, 11 January 2019 07:22:51 UTC-2, Martin Blais wrote: > > That seems like a useful thing to investigate. > I personally would welcome making Beancount a major mode if that interacts > well with it and it serves most people. > It seems to be the most intuitive way for most people. > I

Re: [emacs] using ledger-mode for beancount

2019-01-14 Thread Steve Harmer
I use it the same way you do (org-mode major + bean count minor). As long as the same/similar folding of headlines is available then I wouldn't mind (not that I matter, just giving you a data point.) For me, org-mode + beancount works perfectly. Thanks for the awesome tool. On Friday,

Re: [emacs] using ledger-mode for beancount

2019-01-11 Thread Martin Blais
That seems like a useful thing to investigate. I personally would welcome making Beancount a major mode if that interacts well with it and it serves most people. It seems to be the most intuitive way for most people. I only ever use org-mode major + beancount minor myself. If I recall, Stefan once

Re: [emacs] using ledger-mode for beancount

2019-01-09 Thread Júlio Maranhão
On Sunday, 6 January 2019 18:43:46 UTC-2, Martin Blais wrote: > > Is there a way to have basic org functionality (folding) with it as a > major mode? If so happy to convert > Yes. It's called orgstruct-mode or orgstruct++-mode (https://orgmode.org/manual/Orgstruct-mode.html). I use it because

Re: [emacs] using ledger-mode for beancount

2019-01-07 Thread Stefan Monnier
> Is there a way to have basic org functionality (folding) with it as a major > mode? If so happy to convert You can try and call org-mode's folding command from some other major mode. I haven't tried it, so I don't know how well that would work. But that puts you right back to the original

Re: [emacs] using ledger-mode for beancount

2019-01-06 Thread Martin Blais
Is there a way to have basic org functionality (folding) with it as a major mode? If so happy to convert On Jan 7, 2019 06:24, "Stefano Zacchiroli" wrote: Hi Stefan, On Sun, Jan 06, 2019 at 12:37:14PM -0500, Stefan Monnier wrote: > AFAIK, this is because your major mode is org-mode which

Re: [emacs] using ledger-mode for beancount

2019-01-06 Thread Stefano Zacchiroli
Hi Stefan, On Sun, Jan 06, 2019 at 12:37:14PM -0500, Stefan Monnier wrote: > AFAIK, this is because your major mode is org-mode which does its own > thing with TAB. Right. Do you have any advice (and/or related work examples) on how to make beancount-mode works both as a major and minor mode?

Re: [emacs] using ledger-mode for beancount

2019-01-06 Thread Stefan Monnier
> - completion: I'm not sure how that is supposed to work. beancount-tab > as a function works well for accounts and tags (but not metadata > key/values, apparently), but if I bind it to TAB I lose indentation, > whereas in ledger-mode the two seems to work well together. Maybe I'm > not

Re: [emacs] using ledger-mode for beancount

2019-01-04 Thread Daniele Nicolodi
Hi Stefano, On 04/01/2019 14:25, Stefano Zacchiroli wrote: >> Which functionalities do you miss the most in beancount-mode? > > - completion: I'm not sure how that is supposed to work. beancount-tab > as a function works well for accounts and tags (but not metadata > key/values, apparently),

Re: [emacs] using ledger-mode for beancount

2019-01-04 Thread Stefano Zacchiroli
Ciao Daniele, first of all thanks a lot for your feedback. On Thu, Jan 03, 2019 at 10:30:43AM +0100, Daniele Nicolodi wrote: > I agree that ledger-mode provides some functionality that would be > nice to have in beancount-mode and I started to work on some, however > I'm far from fluent in Elisp

Re: [emacs] using ledger-mode for beancount

2019-01-03 Thread Daniele Nicolodi
Ciao Stefano, On 02/01/2019 13:42, Stefano Zacchiroli wrote: > Is any of the Emacs & Beancount users on this list using ledger-mode to > edit Beancount ledgers? > > I've never found my way around beancount-mode and I really wanted a > major mode dedicated to accounting, so I've started playing