I have resolved the issue in a practical, but unsatisfactory, manner.

I have resorted to creating an interlude, a new heading derived from title, setting it for left pages with no displayed head:
\definehead[ChapterEpigraph][title]
\setuphead [ChapterEpigraph][
                      page={yes,left},
                      insidesection=\vfill,
                      aftersection={\vfill\vfill},
                      header=empty,
                      placehead=no,
                     ]
Thus, \startChapterEpigraph can safely be placed before each \startchapter (and between the last \stopchapter of a part and the start of the next part) when that last chapter ends on a recto). This clears the chapter marking in the headings of the new verso. When there is an epigraph to set, it is placed in the ChapterEpigraph section.

This is unsatisfactory because it implements an inaccurate semantic model of the document – the epigraphs belong to the following chapter, not the numberless, nameless interlude.

And there is almost certainly a bug lurking here. I had considered adding the marking of the next chapter to the interlude to better tie the interlude to the place it belongs. When I made ChapterEpigraph derivative of chapter:
\definehead[ChapterEpigraph][chapter]
\setuphead [ChapterEpigraph][
                      page={yes,left},
                      insidesection=\vfill,
                      aftersection={\vfill\vfill},
                      header=yes,
                      number=no,
                      placehead=no,
                     ]
and provided a marking:
\startChapterEpigraph[marking={Same as next chapter marking}]
The resulting page displayed the marking of the previous chapter, not the marking provided. This appears to be the same behavior as in the example below in my first note, although I can provide another working example using this apparatus if anyone wants it.

Can we please have a \setuphead or \setupheads option to clear markings at the end of the level, and not simply override them when the next equivalent level starts? (Although perhaps, based on the observed issue described just above, there is some other logic at work here.)

--
Rik

On 2017-10-15 23:54, Rik Kabel wrote:

As a followup to my query on suppressing header marking, I have prepared an example which clearly shows odd, if not buggy behavior.

The book places chapter openings on recto pages which follow a verso that may have an epigraph. When there is no epigraph, the blank verso is properly unmarked by a header, but when there is an epigraph, the header from the previous chapter appears on the page. How can I eliminate this orphan header?

\setuppagenumbering [alternative=doublesided,location=]
\setupheadertexts   [][{\it\getmarking[section]}]
                    [{\it\getmarking[chapter]}][]

\starttexdefinition unexpanded startSectionEpigraph
    \dostartbuffer  [SectionEpigraph]
                    [startSectionEpigraph][stopSectionEpigraph]
\stoptexdefinition

\setuphead          [chapter][
                     beforesection=\setups{chapter:epigraph}]

\startsetups chapter:epigraph
    \page[yes,left]% same result with yes,header,footer,left
    \doifelsebuffer{SectionEpigraph}
        {\getbuffer[SectionEpigraph]
         \resetbuffer[SectionEpigraph]}
        {\donothing}
    \page[yes,header,footer,right]
\stopsetups

\starttext

    \completecontent

    \startfrontmatter
    \startchapter[title=Preface]
        \startparagraph
            \input ward
        \stopparagraph
    \stopchapter

    \stopfrontmatter
    \startbodymatter

    \startchapter[title=Chapter First]
        \startparagraph
            \input ward
        \stopparagraph
    \stopchapter

    \startSectionEpigraph
        Why does this page have the heading
        from the previous chapter?
    \stopSectionEpigraph

    \startchapter[title=Chapter Second]
        \startparagraph
            \input ward
        \stopparagraph
    \stopchapter

    \startSectionEpigraph
          Look up!
    \stopSectionEpigraph

    \startchapter[title=Chapter Third]
        \startparagraph
            \input ward
        \stopparagraph
    \stopchapter

    \startchapter[title=Chapter Final]
        \startparagraph
            \input ward
        \stopparagraph
    \stopchapter

    \stopbodymatter

\stoptext
--
Rik


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________