From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: p tags and indenting in Html Mode Date: Wed, 02 Sep 2009 00:52:23 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <7ctyzop7gg.fsf@pbourguignon.anevia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251848451 26575 80.91.229.12 (1 Sep 2009 23:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2009 23:40:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 02 01:40:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Micxw-0001d0-7t for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Sep 2009 01:40:44 +0200 Original-Received: from localhost ([127.0.0.1]:54477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Micxv-0002tU-LM for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Sep 2009 19:40:43 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+88eqVziIPKvrRPymxFLiY0ZuYvjovNUoMU23mzakqj16qHQC1BMpibEIYxxkC0sWOvvORAIqvBRJO20HrSg/Tn+AXeMozBKrnGrguvc6VBddraf7PdWkLuGS+nfkmXQgLuJxigcKY7g== Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Tue, 1 Sep 2009 22:52:24 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+cSIY658EeTkNO/eqIrjMMd0N7ORR9X3E= Cancel-Lock: sha1:bhTUgmzaxv/eMgQgarLnazPv5jM= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:172578 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67719 Archived-At: Tyler Smith writes: > Richard Riley wrote: >> pjb@informatimago.com (Pascal J. Bourguignon) writes: >> >>> Tyler Smith writes: >>> >>>> Html mode recognizes that

tags don't need to be closed, so >>>> successive tags get indented to the same level. But when an unclosed >>>>

tag is followed by a heading (e.g.,

), the heading gets >>>> indented as if it were within the previous

, as do all subsequent >>>> tags that aren't

tags. In other words, the heading is indented >>>> further than the

tags that were there before. How can I get html >>>> mode to keep the indentation at the same level? I put a small example >>>> below to clarify. >>>> >>>> >>> Close your tags! So your html becomes more compatible with xhtml. >>> >> >> A lot of web designers don't go anyway near xhtml because it's a pain >> and doesn't work properly anywhere other than in theory :-; A google for >> "xhtml not working" tells you why. >> >> Having said that closing tags is a better idea. >> > > I don't really care one way or the other about xhtml. I tried closing my > tags by turning on sgml-xml-mode. This makes html mode insert a closing >

tag, which solves my original problem. But it also expects closing > tags for other html tags that don't normally use them: link, base, img > etc. So in sgml-xml-mode, indentation is screwed up following all of > those tags. I can of course manually close my

tags, or use C-c /, > but there should be a better way. Can I make html-mode close p tags > without turning on sgml-xml-mode? I have tried poking around with the > tag skeletons, but I find the documentation a little challenging. > > As an off-topic aside, is xhtml still moving forward? I thought the W3C > had recently decided to ditch it in favor of html 5? Anything I've read > suggests that there's no compelling reason to use xhtml for > webdesign. I tried it and regretted a LOT of wasted time and effort. It talked a good talk but failed the walk. I was somewhat surprised by some replies there that seemed to suggest xhtml was the working, accepted standard. It's most certainly not and a LOT of programmers have dropped it. So I'm with you on that one. > If that's the case, I'd rather get html-mode configured to support > regular html. I'm not really invested in either option, I just want > consistent indentation that doesn't require manually tweaking my tags. I use nxhtml generally, but there are issues I intend to report back to Lennart. Its pretty slow and there are some nasty indentation issues with certain mixed files (php and x/html). Having said that I do close tags. I'm still not sure of the best way to use emacs for this kind of programming, but nxhtml seems the best of the bunch for me.