Ihor Radchenko writes: > There should be no other buffer setting that is taken into account > in COMMENTed subtrees. EXPORT_FILE_NAME is the only one. > > I think that we should not really change the manual unless we have to. > It will be better to fix the bug instead. I am attaching a tentative change to ox.el machinery that will allow calculating EXPORT_FILE_NAME dynamically inside the processed export buffer. The change is not yet fixing the bug. I just want to hear feedback on the approach I used. Let me know if you see any issues or have better ideas.