unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 48334@debbugs.gnu.org, m.a.nikulin@gmail.com
Subject: bug#48334: No <title> elements in HTML manual pages
Date: Sun, 03 Jul 2022 16:13:20 +0300	[thread overview]
Message-ID: <83o7y69w5r.fsf@gnu.org> (raw)
In-Reply-To: <87fsjibdd0.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  03 Jul 2022 14:16:27 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: m.a.nikulin@gmail.com,  48334@debbugs.gnu.org
> Date: Sun, 03 Jul 2022 14:16:27 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > 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.

makeinfo is supposed to be a symlink to texi2any.

> 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))

Yes.  (But that's not the only editing we do, although the rest isn't
relevant to <title>, I think.)

> So we delete the <title> that makeinfo --html has created.  Perhaps
> that's just a bug?

It is definitely done on purpose, but I don't know what is the purpose
of deleting <title> (and many other parts of the headers as well).

> I see that you adjusted this code in May...

I made changes there because someone reported a problem with reading
the manuals on mobile devices, because we were deleting the line with
'<meta name="viewport"...', which in latest Texinfo takes care of
adjusting the viewport to the width of the device display.  My changes
were supposed to avoid deletion of this header (and a few others), but
I don't think I kept <title>.

I think the solution to this is for some HTML5 expert to look at our
edits vs what Texinfo 6.8 produces, and tell which parts of the
editing are needed (and why) and which aren't.  I'm far from being
that expert.

Failing that, I think the only alternative is to see how the original
Texinfo output looks in a browser, compare that with the edited
manuals, and then decide which of the edits are really needed.  One
problem with that is that we'll probably have to require Texinfo 6.8
or later if we go that way, because maintaining compatibility with
multiple Texinfo versions is really too much.  Ideally, we should keep
the edits to the absolute minimum.





  reply	other threads:[~2022-07-03 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 14:48 bug#48334: No <title> elements in HTML manual pages Maxim Nikulin
2021-10-05 14:14 ` Maxim Nikulin
2022-07-02 16:19   ` Lars Ingebrigtsen
2022-07-02 17:02     ` Eli Zaretskii
2022-07-03 12:16       ` Lars Ingebrigtsen
2022-07-03 13:13         ` Eli Zaretskii [this message]
2022-07-03 14:48           ` Max Nikulin
2022-07-04 10:42           ` Lars Ingebrigtsen
2022-07-04 11:36             ` Eli Zaretskii
2022-07-05 11:09               ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o7y69w5r.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48334@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=m.a.nikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).