all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tyler Smith <tyler.smith@eku.edu>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: p tags and indenting in Html Mode
Date: Mon, 31 Aug 2009 10:24:52 -0400	[thread overview]
Message-ID: <4A9BDD34.9030706@eku.edu> (raw)
In-Reply-To: <h7gdu2$r23$1@news.eternal-september.org>

Richard Riley wrote:
> pjb@informatimago.com (Pascal J. Bourguignon) writes:
>   
>> Tyler Smith <tyler.smith@eku.edu> writes:
>>     
>>> Html mode recognizes that <p> tags don't need to be closed, so
>>> successive tags get indented to the same level. But when an unclosed
>>> <p> tag is followed by a heading (e.g., <h3>), the heading gets
>>> indented as if it were within the previous <p>, as do all subsequent
>>> tags that aren't <p> tags. In other words, the heading is indented
>>> further than the <p> 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 
</p> 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 <p> 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






  reply	other threads:[~2009-08-31 14:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5697.1251714881.2239.help-gnu-emacs@gnu.org>
2009-08-31 11:07 ` p tags and indenting in Html Mode Pascal J. Bourguignon
2009-08-31 11:58   ` Richard Riley
2009-08-31 14:24     ` Tyler Smith [this message]
2009-09-01 22:31       ` Edward O'Connor
2009-08-31 22:27     ` Lennart Borgman
     [not found]     ` <mailman.5747.1251757661.2239.help-gnu-emacs@gnu.org>
2009-08-31 23:44       ` Richard Riley
2009-09-01 19:36     ` Tyler Smith
     [not found]     ` <mailman.5806.1251843008.2239.help-gnu-emacs@gnu.org>
2009-09-01 22:52       ` Richard Riley
2009-09-02 10:00         ` Lennart Borgman
2009-09-02 12:16           ` Richard Riley
2009-09-02 14:51             ` Lennart Borgman
2009-09-02 15:31               ` Richard Riley
2009-09-02 15:42                 ` Lennart Borgman
2009-08-31  0:48 Tyler Smith
  -- strict thread matches above, loose matches on Subject: below --
2009-08-30 19:17 Tyler Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9BDD34.9030706@eku.edu \
    --to=tyler.smith@eku.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.