On 18/07/2020 15:53, TRS-80 wrote:
> I finally got around to giving the "new" beancount.el major mode a
> try.  I am a daily user of org-mode since years, and therefore many of
> org-mode keybindings are very, very well trained muscle memory by now.
> So much that I am really struggling with beancount-mode as major +
> outline-mode as minor.  I have already re-bound a few common things as
> suggested, but can't help but wondering how many more things I will
> need to keep re-binding before I will feel comfortable again.

I am an user of org-mode myself and I am also who promoted beancount to
a major mode. There aren't many org-mode keybindings that make sense in
an beancount buffer other than the ones used for headlines tree
navigation. What else are you missing? Also, note that org-mode is (at
least in spirit) and extension of outline-mode, of which
outline-minor-mode is the minor mode incarnation. Thus, it is fairly
easy to map functionality between the two. Please refer to the
outline-minor-mode documentation.

What are you missing? beancount.el already has some code to augment
outline-minor-mode to make it behave more like org-mode. If there are
other desirable (reasonable) features I don't exclude we can add them.

> So I started thinking the other way.  How to make org-mode to be the
> major mode, and beancount a minor mode again?  Once upon a time I had
> started toying around writing my own very basic mode, and I dabble in
> elisp more and more, so I started looking into beancount.el.
> 
> Then I started thinking, there must have been some trade-off, or
> reason for making it into a major mode?  Is there some functionality
> that can only be gained by major mode status?  Such deep understanding
> is certainly beyond my wizard level presently, so I thought better
> stop there and just ask before I get in too deep.

As far as I know there aren't any fundamental limitations of what can be
done in a minor mode vs a major mode. The issue is that a minor mode
inherits all the "setup" performed by the major mode. In the case of
org-mode and beancount as a minor mode it was very hard (or impossible)
to adapt org-mode features to what is desired in a benacount buffer.
Completion is a notable example, electric indentation is another.

Overall I think the current design is much nicer, both from a conceptual
and user point of view and from a code point of view. However, as it as
been already pointed out, the old beancount minor mode code is preserved
in the git history and released with a open source license. If you like
it more, you are free to use it and improve upon it. Just, please, if
you release it, do that under a name that makes it clear that it is a
distinct project.

Best,
Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/1561f46f-7f4d-f8f3-12f0-700dd2da5f38%40grinta.net.

Reply via email to