On Mon, Feb 24, 2025 at 07:46:53PM +0000, Gavin Smith wrote:
> Could we not do the opposite?  That is, make an empty @detailmenu block
> *suppress* autogeneration of a detailmenu.

I think that we should not force users to use non sensical Texinfo code
to customize the output.

In that case, in addition, there is a @menu generated only if there is
no @menu, and thus, no @detailmenu.

> It would make sense to me, that if a @detailmenu block already exists,
> then a new one should not be generated.

This is only relevant for an existing @menu with a @detailmenu in it.
In that case, the detailmenu is regenerated only with the
regenerate_master_menu TREE_TRANSFORMATIONS, and what is documented is:

     ‘regenerate_master_menu’
          Update the Top node master menu, either replacing the (first)
          ‘@detailmenu’ in the Top node menu, or creating it at the end
          of the Top node menu.

Therefore, a @detailmenu is used to mark where the @detailmenu should be
regenerated, and not considered as a manually crafted @detailmenu that
should be kept.

I think that this makes sense, the original document is not modified, so
if there is a crafted detailmenu the user should better not call
TREE_TRANSFORMATIONS with regenerate_master_menu.

-- 
Pat

Reply via email to