Juri Linkov writes: >> If someone came up with a patch to allow outline.el to delimit and hide >> sections using a logic closer to magit-section's[1] (via an opt-in >> variable, to be set e.g. by major modes, so that users happy with the >> status quo are not affected), would that patch be given any >> consideration? > > I suspect magit just inserts newlines without text properties > between outlines, thus avoiding the problem. I don't believe that to be the case? Diff sections, for example, are shown as an outline with 3 levels: (1) filename heading, (2) hunk headings, (3) the hunk content (context lines + removed and added lines). (1), (2) and (3) are painted with :extended faces, applied through text properties (the magit-diff-file-heading, magit-diff-hunk-heading and magit-diff-{context,removed,added}, respectively). When under point, they also get painted with another set of :extended faces (e.g. magit-diff-file-heading-highlight), applied either through overlays ((1), (2)) or text properties (3). AFAICT there is no single unpainted newline beween these sections. > Could you send > a screenshot that shows a newline with the :extend attribute > as the final character of the outline in magit? See attached, showing a recent revision from emacs.git master, with the diff completely folded (1.png) with hunks folded (2.png) and completely unfolded (3.png). I hope I understood your suspicion correctly and my answer was relevant? Let me know if I misunderstood. FWIW "insert a supplementary newline before headings" is indeed a well-known workaround in the Org community.