Closed JAremko closed 7 years ago
I tried it with Emacs25 and snapshot
I think it happens because Emacs in "normal mode" loads different org-mode version
Hey!
Not really. The mode actually uses a state variable that tracks headings and their "hrefified" versions (both for adding suffices (like, -1
, -2
, etc) and C-c C-o
jumping). So, you need to call toc-org-enable
prior to toc-org-insert-toc
. Try emacs --batch -l toc-org.el --file README.org --eval "(progn (toc-org-enable) (toc-org-insert-toc) (save-buffer))"
@snosov1 thx!
:+1:
If I run
toc-org-insert-toc
normally (from Emacs) I'll gethttps://gist.github.com/JAremko/acc95c9efbe2cd3d68773bbb9aa624df
But if I do something like this:
I'll get that:
https://gist.github.com/JAremko/3a098fa1ee439cd1e9df31ea4dd7c24d
diff https://www.diffchecker.com/BYfFinYe