-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Description
When opening the html-buffer in the browser, it is not rendered as expected from a correct html-buffer. Instead, it "rendered", e.g. showed the html-buffer as visible within Emacs (even the theming was duplicated).
To Reproduce
Emacs version:
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-21
html-code:
<!DOCTYPE html5>
<html>
<title>Minimal Reproducible Example.</title>
<body>
<p>First paragraph</p>
<p>Second paragraph</p>
</body>
</html>Configuration
(use-package impatient-mode)I execute the following steps:
- open html-file in buffer
M-x httpd-startM-x impatient-modeM-x imp-visit-buffer
Screenshots
Here it is, with html-ts-mode supplied by html-ts-mode.el:
And this is what I get when I switch to html-mode supplied by sgml-mode.el (and reenable impatient-mode again, because it drops when I switch major modes):
Additionals
I have also tested this with other modes derived from sgml-mode.el's html-mode, like mhtml-mode, where the buffer is rendered correctly in the browser.
Edit (possible solution)
It does work after I have changed imp-default-user-filters to the following:
(defcustom imp-default-user-filters '((mhtml-mode . nil)
(html-mode . nil)
(html-ts-mode . nil)
(web-mode . nil))
"Alist indicating which filter should be used for which modes."
:group 'impatient
:type 'sexp)I always thought that html-mode remaps to html-ts-mode, like most other modes do (I think), but it seems like this isn't the case here.
I have added this to my config, which solves it. Maybe this could become a default at some point?
(use-package impatient-mode
:config
(add-to-list 'imp-default-user-filters '(html-ts-mode . nil)))
