From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tyler Smith Newsgroups: gmane.emacs.help Subject: Re: p tags and indenting in Html Mode Date: Mon, 31 Aug 2009 10:24:52 -0400 Message-ID: <4A9BDD34.9030706@eku.edu> References: <7ctyzop7gg.fsf@pbourguignon.anevia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251843552 14274 80.91.229.12 (1 Sep 2009 22:19:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2009 22:19:12 +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 00:19:05 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 1Mibgs-0004aC-G9 for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Sep 2009 00:19:02 +0200 Original-Received: from localhost ([127.0.0.1]:54306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mibgr-0006bI-PX for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Sep 2009 18:19:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi88F-00032Z-QV for help-gnu-emacs@gnu.org; Mon, 31 Aug 2009 10:45:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi885-0002xy-QL for help-gnu-emacs@gnu.org; Mon, 31 Aug 2009 10:45:14 -0400 Original-Received: from [199.232.76.173] (port=51411 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi885-0002xl-FE for help-gnu-emacs@gnu.org; Mon, 31 Aug 2009 10:45:09 -0400 Original-Received: from ekuhub1.eku.edu ([157.89.36.110]:32728 helo=ekumail.eku.edu) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Mi884-00011K-Ot for help-gnu-emacs@gnu.org; Mon, 31 Aug 2009 10:45:09 -0400 Original-Received: from [127.0.0.1] (157.89.133.36) by ekuhub1.eku.edu (157.89.36.112) with Microsoft SMTP Server id 8.1.393.1; Mon, 31 Aug 2009 10:24:54 -0400 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 1208 seconds by postgrey-1.27 at monty-python; Mon, 31 Aug 2009 10:45:03 EDT X-Mailman-Approved-At: Tue, 01 Sep 2009 18:10:06 -0400 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:67711 Archived-At: 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. 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. Thanks again, Tyler