From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: pretty-layout in html-mode Date: Tue, 12 May 2009 05:58:26 -0400 Message-ID: <4A094842.8090701@mousecar.com> References: <4A09414F.2010206@simplistix.co.uk> Reply-To: gebser@mousecar.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242122377 10587 80.91.229.12 (12 May 2009 09:59:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 May 2009 09:59:37 +0000 (UTC) Cc: Emacs Help To: Chris Withers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 12 11:59:27 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 1M3olj-0003mU-4q for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 11:59:27 +0200 Original-Received: from localhost ([127.0.0.1]:32926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3oli-0007JY-9P for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 05:59:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3ol5-0007JT-8E for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:58:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3ol2-0007JG-IW for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:58:45 -0400 Original-Received: from [199.232.76.173] (port=55808 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3ol2-0007JD-C4 for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:58:44 -0400 Original-Received: from mout.perfora.net ([74.208.4.194]:64762) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3ol2-00040f-0K for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:58:44 -0400 Original-Received: from [192.168.0.26] (dsl093-011-017.cle1.dsl.speakeasy.net [66.93.11.17]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0MKp8S-1M3okr2rt1-000g5x; Tue, 12 May 2009 05:58:36 -0400 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) In-Reply-To: <4A09414F.2010206@simplistix.co.uk> X-Enigmail-Version: 0.95.7 OpenPGP: id=5AD091E7 X-Provags-ID: V01U2FsdGVkX1+xU64DpPwzEC+rcYHpxrINLNI9UnUrLRgRjy8 quh8UMltb/BNj/UcsZUHrZjKYEHLYUutbsRox+QDm3fIWmzaif wTs4qyrCEP5S3uIyXxstclUNBeFkJt7 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:64367 Archived-At: On 05/12/2009 05:28 AM Chris Withers wrote: > Hi All, > > In html-mode, how can I get the html layed out out sensibly? > (ie: I'm starting off with a file that has weird tabbing, spacing, etc, > all over the place and I want it all normalised) > .... Using html-helper-mode, doing C-i properly indents the current line. So in such files I start with the point on the first line, do C-i, then do the same on the second line, and so on. This of course doesn't work if all the html code is on one line. The tags and text you want to indent properly must lie at the beginning of a new line (optionally with some white space preceding it); that is, C-i won't insert newlines at proper locations. ("Proper location" is not an objective determination anyway.) But html-helper-mode does understand opening and closing tags and (normally) indents these at the same level. hth, ken