Closed Alexander-Miller closed 3 years ago
Hey, @Alexander-Miller !
Thanks for the PR - overall, I'm in for the change. Though, I'm not sure I 100% understand how it works. So, you've moved the access to org-list-indent-offset
out of toc-org-hrefify-toc
- but how does it affect the global/local access? (is it because the access is moved out of with-temp-buffer
?)
is it because the access is moved out of with-temp-buffer?
Pretty much, yes. with-temp-buffer
moves us out of the original org buffer where the save hook is running, so the buffer-local value is lost in this new context and needs to be passed in explicitly.
Ok, got'ya! Let's mUrge!
Oh, heck, the tests were broken, I've reverted the change.
https://travis-ci.org/github/snosov1/toc-org/builds/767837629
Can you,please, fix them?
I can do it later today.
Currently org-toc uses the global value of
org-list-indent-offset
, which always leads to unnecessary changes in the toc when 2 people with different offsets edit the same file (quite inconvenient with PRs).With this change the buffer-local value will be used.