{"id":21,"date":"2007-05-01T12:03:11","date_gmt":"2007-05-01T12:03:11","guid":{"rendered":""},"modified":"2017-03-07T16:11:04","modified_gmt":"2017-03-07T16:11:04","slug":"html_editing_in_emacs","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/dams\/2007\/05\/01\/html_editing_in_emacs\/","title":{"rendered":"HTML editing in emacs"},"content":{"rendered":"<p>I&#8217;m an emacs user since 2000, but I actually never really had to mess with HTML a lot, as I never did real web development (that&#8217;s unusual nowadays, isn&#8217;t it ?), until recently.<\/p>\n<p>Here is the history of what I have used so far :<\/p>\n<ul>\n<li> <em>built-in html-mode<\/em>: not really helpful<\/li>\n<li> <em>sgml-mode<\/em>: better, but indentation and some HTML-only syntax are not well formated. But still a valid choice<\/li>\n<li> <em>sgml-mode + <a href=\"http:\/\/mmm-mode.sourceforge.net\/\">mmm-mode<\/a> <\/em>: I used that for <a href=\"http:\/\/www.masonhq.com\/\">Mason<\/a> development. It did the trick pretty well.<\/li>\n<li> <em><a href=\"http:\/\/www.thaiopensource.com\/nxml-mode\/\">nxml-mode<\/a><\/em>: a very good mode, which is more XML oriented. The problem is that  by default it tries to validate HTML, and its indentation is not working great by deafult (at least for me). However it&#8217;s probably the best thing around if you need to edit XML within emacs<\/li>\n<\/ul>\n<p>Slanning just told me he uses <em><a href=\"http:\/\/www.nongnu.org\/baol-hth\/\">html-helper-mode<\/a><\/em>. I tried it, and it seems to be what I need : a lightweight HTML mode with syntax highlighting and indentation working from scratch. Coupled with mmm-mode, it&#8217;s probably the best way of editing HTML, JSP, Mason, etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m an emacs user since 2000, but I actually never really had to mess with HTML a lot, as I never did real web development (that&#8217;s unusual nowadays, isn&#8217;t it ?), until recently. Here is the history of what I have used so far : built-in html-mode: not really helpful sgml-mode: better, but indentation and &hellip; <a href=\"https:\/\/blogs.gentoo.org\/dams\/2007\/05\/01\/html_editing_in_emacs\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HTML editing in emacs<\/span><\/a><\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/posts\/21\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/dams\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}