GNU bug report logs - #43511
27.1; [PATCH] Files with lowercase doctype are not in mhtml-mode by default

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Sat, 19 Sep 2020 14:36:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Martín <mardani29 <at> yahoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; [PATCH] Files with lowercase doctype are not in mhtml-mode by
 default
Date: Sat, 19 Sep 2020 16:35:14 +0200
[Message part 1 (text/plain, inline)]
This is a regression caused by the fix for bug 36401.

Steps to reproduce:

emacs -Q
M-x browse-url-emacs RET https://www.gnu.org/software/emacs/ RET

Expected results:

The HTML contents of the Emacs website are shown, and the buffer is in
mhtml-mode.

Actual results:

The HTML contents of the Emacs website are shown, but the buffer is in
fundamental-mode.

The proposed solution to accomodate both wanted behaviors is to extend
the regular expression to cover a "DOCTYPE" in a case-insensitive
way. The standard says that's also supported:
https://html.spec.whatwg.org/multipage/syntax.html#the-doctype

I've attached a patch with the proposed solution, on top of
emacs-27. Let me know if you'd want to apply it on top of master
instead.

Thanks.

[0001-Put-files-in-mhtml-mode-when-they-have-DOCTYPE-case-.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.