Subject: Re: bug#48334: No <title> elements in HTML manual pages

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 03 Jul 2022 14:16:27 +0200

Eli Zaretskii <[email-masked]> writes:

>> > Emacs manual is generated by texi2html, texinfo and e.g. Org mode by
>> >     makeinfo --html ...
>> > In the latter case pages have <title> element, in the former they do
>> > not (at least without some tuning).

[...]

> We are.  See the instructions in admin/make-tarball.txt and the
> scripts admin/make-manuals and admin/upload-manuals.
>
> I don't remember if texi2any produces <title>, but the above scripts
> modify the HTML produced by texi2any, so what we eventually have is
> the result of those scripts.

Hm...  it looks like the manuals are produced with "makeinfo --html",
though -- I can't see any usage of texi2html or texi2any there, but I
may be missing something.

> We could decide dropping admin/make-manuals, or at least the parts
> that modify the produced HTML, but presumably those parts were written
> for a reason.  Unfortunately, I see no detailed documentation of the
> reasons for those changes, so it's hard to decide whether any of them
> are still valid, what with Texinfo's progress since the time those
> changes were coded.

Ah, it's this code:

(defun manual-html-fix-headers ()
  "Fix up HTML headers for the Emacs manual in the current buffer."
  (let ((texi5 (search-forward "<!DOCTYPE" nil t))
	opoint)

[...]

    (search-forward "<meta")
    (setq opoint (match-beginning 0))
    (unless texi5
      (search-forward "<!--")
      (goto-char (match-beginning 0))
      (delete-region opoint (point))
      (search-forward "<meta http-equiv=\"Content-Style")
      (setq opoint (match-beginning 0)))
    (search-forward "</title>\n")
    (delete-region opoint (point))

So we delete the <title> that makeinfo --html has created.  Perhaps
that's just a bug?  I see that you adjusted this code in May...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no