When running C-c C-e H A, the menu weight was auto-calculated on the pre-processed buffer
When running C-c C-e H H, the menu weight was auto-calculated on the original buffer
So when C-c C-e H A was run, it as possible that the original subtree location moved in the pre-processed buffer quite a bit, enough to result in incorrect menu weights.
This issue was difficult to reproduce.. it occurred only when running
C-c C-e H A
and not when runningC-c C-e H H
!While this bug was residing in ox-hugo for a while, it got triggered only when the test subtrees changes while working on https://github.com/kaushalmodi/ox-hugo/pull/641.
Reason
C-c C-e H A
, the menu weight was auto-calculated on the pre-processed bufferC-c C-e H H
, the menu weight was auto-calculated on the original bufferSo when
C-c C-e H A
was run, it as possible that the original subtree location moved in the pre-processed buffer quite a bit, enough to result in incorrect menu weights.