To manage my config I use org-mode. To manage packages inside this I use use-package. Problem is that there are packages that require a lot of configuration like ibuffer and org-mode. Now I'm looking for a way to fold code inside an org-mode elisp source code block. The blocks should be folded based on headlines.
Below is a a workaround solution to archieve that goal above indirectly. The problem with that is that it creates even more source code blocks which is ugly overhead. I tried to use orgstruct++ (which is the more or less exactly the solution I need) inside the elisp block but that does not seem to work either. I get an error, and I presume that orgstruct++ was not intended for use on org-files. Is my goal impossible to achieve?
What I tried inside the elisp source code block
;;; -*- orgstruct-heading-prefix-regexp: ";;" -*-
;; Does this and that
...
;; Does that and this
...
Workaround example:
*** TLDR - Too Long Didn't Read cheat.sh offline Repository run tldr-update-docs before first run, wait for the download/decompression
**** Use-Package Opening
#+BEGIN_SRC emacs-lisp
(use-package tldr
#+END_SRC
**** Misc Configuration
#+BEGIN_SRC emacs-lisp
:commands
(tldr tldr-mode tldr-update-docs my-tldr-only-linux my-tldr-only-osx my-tldr-only-common+linux)
:config
(setq tldr-enabled-categories '("common" "linux" "osx"))
#+END_SRC
**** Custom Functions
***** Filter TLDR
#+BEGIN_SRC emacs-lisp
(defun my-tldr-only-osx ()
(interactive)
(let ((tldr-enabled-categories '("osx")))
(tldr))) (defun my-tldr-only-linux ()
(interactive)
(let ((tldr-enabled-categories '("linux")))
(tldr))) (defun my-tldr-only-common+linux ()
(interactive)
(let ((tldr-enabled-categories '("common" "linux")))
(tldr)))
#+END_SRC
**** Use-Package Closing
#+BEGIN_SRC emacs-lisp
)
#+END_SRC