[ Adding Org mailing list back to CC. Please use "Reply All" to keep the conversation public ] Lei Zhe writes: >> May you please explain in more details what problem you are trying to >> solve? > Sure. I've identified an issue on the master branch where, if the cursor is > not inside the table at WS, `org-table-begin' in > `org-table-header-set-header' > gets the beginning position of the next table in the buffer. > so `(pos-visible-in-window-p beg)' returns true, causing the header overlay > of the table at WS to not display. > >> Moving point to WS and then immediately to the beginning of the table >> makes no difference. So, your patch does nothing. > Moving point to WS ensures`org-table-begin' to get the beginning position > of the table at WS, regardless of the cursor position, which resolves the > above problem. Thanks for the explanation. Now the patch makes more sense. I am attaching a modified version of the patch with updated commit message and a code comment added explaining why we need to move to WS. P.S. Bastien, may your please check Lei Zhe's copyright status?