Skip to content
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

[BUG] org-cycle/org-fold with outline mode has stopped working in ledger mode #337

Open
wakatara opened this issue Jun 13, 2022 · 5 comments

Comments

@wakatara
Copy link

wakatara commented Jun 13, 2022

Heya awesome ledge-mode maintainers!

This might seem like a minor thing, but it is making my monthly accounting hellish since I have long complex files for both personal and business accounting. That is, all of a sudden, my tab no longer folds/unfolds sections of my ledger files.

Here's my config. I've changed nothing of late other than using straight-pull-all to grab updated packages. This appears to be either related to some change in ledger-mode or in org-fold's functionality (it might be the latter).

;; ========== Ledger mode =========
(use-package ledger-mode
  :straight t
  :defer t
  :hook
  (ledger-mode . outline-minor-mode)
  :bind
  (:map ledger-mode-map
        ("TAB" . org-cycle))
  :config
  (font-lock-add-keywords 'ledger-mode outline-font-lock-keywords)
  :mode
  ("\\.ledger$" . ledger-mode)
  )

At the monent, when attempting to fold on a line with a heading denoted by * with TAB now, I'm getting this message from emacs:
Calling 'org-fold-core-region' with missing SPEC

Org-mode files fold fine themselves, so a bi puzled as to whzat could be wrong, but it's killing me in terms of buzzsaw-ing through my monthly finances atm. Could really use some help on what might be wrong.

(and also, while I have the chance, thank you maintainers for making this plugin. It is by far the best of all the plugins across IDEs for making ledger a super useful tool. I know, I've tried them all. =] ).

@wakatara
Copy link
Author

I should point out that this still seem to work with outline mode since I can fold major and minor sections with C-C @ C-C so this may be something related to changes in org-fold/org-cycle. It is really strange as it just suddenly stopped working.

@purcell
Copy link
Member

purcell commented Jun 13, 2022

I feel like if org-cycle was working for you previously in ledger-mode then that was more a matter of luck than anything that the ledger-mode maintainers could influence for you.

@wakatara
Copy link
Author

Lol... Hmmm, I see. Well, it was super, super handy lemme tell ya.

So, I am assuming this means that this is a problem with org-mode more than ledger then? (one of the hardest things I find about troubleshooting things going wrong in emacs is on which package to poke at... :-/ ).

(and thanks for replying so promptly!)

@wakatara wakatara changed the title [BUG] org-cycle/org-fold with outline mode has stopped working in ledger files [BUG] org-cycle/org-fold with outline mode has stopped working in ledger mode Jun 13, 2022
@purcell
Copy link
Member

purcell commented Jun 13, 2022

I am assuming this means that this is a problem with org-mode more than ledger then?

It looks that way to me!

@doolio
Copy link

doolio commented Jan 4, 2024

But outline-minor-mode still works. Is it a case you don't like its default bindings? They can always be changed to your liking. An alternative is if you happen to use consult then consult-outline` will present the outline headings via its completing read interface.

In any case, I think this issue can be closed as it is unrelated to ledger-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants