Closed VladimirAlexiev closed 8 years ago
Not sure I understand the problem.
I think the idea is to auto insert a TOC in none exists.
Personally, I would prefer you let the user customize this package behavior, for example with
(advice-add 'toc-org-insert-toc :before #'toc-org-advice)
You define your own toc-org-advice
, as the one above
I think the idea is to auto insert a TOC in none exists.
You mean right after opening the file? Or what? I still don't fully understand =)
Well, when toc-org-insert-toc
acts, that's to say, when before-save-hook
is called. No need to modify the package to achieve this, in my opinion.
Yeah, if you want to generate the TOC right after you open the file, you can use find-file-hook
. Not sure it's a good idea, though. Some time ago, this was a default behavior of the mode, but I eliminated that.
If this mode depends on a :TOC:
heading, I think it should ensure (or at least have an option to do it).
But I'm also happy to close this. @csantosb thanks, your code is better, esp :noexport:
so I can use the "native" toc:t
for html export
Ok, let's close it. Thx!
Something for
toc-org-enable
:Why
:TOC_5:
not:TOC_2:
? See #27