From: Angela Bellavance <bellavan@fnal.gov>
To: help-gnu-emacs@gnu.org
Subject: Possible bugs with indentation in html mode
Date: Fri, 16 Feb 2007 17:31:18 -0600 [thread overview]
Message-ID: <45D63EC6.2090703@fnal.gov> (raw)
Hello,
I'm editing HTML code using emacs and I'm noticing
some strange behavior with the indentation.
I can hit TAB on elements like "<table>" and "<tr>"
and "<td>", and emacs will happily indent each by
two spaces relative to the container tag, ending the
additional space when it finds the corresponding
closing tag. However, it does not handle single tags
well (e.g. "<br>", "<meta...>", etc.). Emacs adds
the two-space indentation following one of these
single tags and will not decrement the indentation
unless a closing tag is found for some surrounding
set of tags.
Is there any chance of fixing this behavior?
I had one other question as well. Is there any way
to make the indentation behavior follow the
"relative to previous line" rule? Personally, I
don't always want the addition of two spaces of
indentation added every time I open a tag set. For
example, I would prefer something like this:
<html>
<head>
<title>
<font color="black">This is my title</font>
</title>
</head>
<body>
<h1>This is my title</h1>
<br>
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
</body>
</html>
But if I TAB-indent the above HTML using Emacs, I
get this:
<html>
<head>
<title>
<font color="black">This is my title</font>
</title>
</head>
<body>
<h1>This is my title</h1>
<br>
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
</body>
</html>
When I've got nested tables with large cell
contents, having every line indented those extra
several spaces can really be a pain....
Thanks for any help or suggestions!
- Angela
--
Dr. Angela Bellavance
Fermilab Computing Division
Running Experiments Operations
630-840-2284
bellavan@fnal.gov
next reply other threads:[~2007-02-16 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-16 23:31 Angela Bellavance [this message]
[not found] <mailman.4635.1171668686.2155.help-gnu-emacs@gnu.org>
2007-02-17 4:41 ` Possible bugs with indentation in html mode Stefan Monnier
2007-02-17 5:57 ` Angela Bellavance
2007-02-17 6:37 ` Matthew Flaschen
2007-02-17 16:55 ` Stefan Monnier
[not found] ` <mailman.4641.1171694271.2155.help-gnu-emacs@gnu.org>
2007-02-17 16:58 ` RealityMonster
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=45D63EC6.2090703@fnal.gov \
--to=bellavan@fnal.gov \
--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.