* bug#8515: M-x indent-region should skip everything between <pre>-tags.
@ 2011-04-17 18:57 Rob Browning
2011-04-19 12:59 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Rob Browning @ 2011-04-17 18:57 UTC (permalink / raw)
To: 8515; +Cc: 448563-forwarded, Juhapekka Tolvanen
(If possible, please preserve the 448563-forwarded address in any replies.)
The following bug report (or perhaps feature request) was filed with the
Debian tracker, and I wanted to ask your opinion about the issue.
Thanks
Juhapekka Tolvanen writes:
> You reproduce this bug this way:
> 1) Download this HTML-file:
> http://iki.fi/juhtolv/mswordmail.html
> or this:
> http://iki.fi/juhtolv/pelle.html
> 2) Open it with GNU Emacs. nXML-mode should be the major mode.
> 3) Check out, how text between <pre> -tags is not indented.
> 4) Paint whole buffer with key: Ctrl-x h
> 5) Give line-command called indent-region.
> 6) See, how everything between <pre> -tags became indented although it
> is not supposed to.
> Maybe this should be configurable option. Normal Tab-key pressing
> in the beginning of some line between <pre>-tags should cause some kind
> of indentation according to Tabs-vs-Spaces-settings.
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8515: M-x indent-region should skip everything between <pre>-tags.
2011-04-17 18:57 bug#8515: M-x indent-region should skip everything between <pre>-tags Rob Browning
@ 2011-04-19 12:59 ` Stefan Monnier
2011-04-19 13:45 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2011-04-19 12:59 UTC (permalink / raw)
To: Rob Browning; +Cc: 8515, Juhapekka Tolvanen, 448563-forwarded
> The following bug report (or perhaps feature request) was filed with the
> Debian tracker, and I wanted to ask your opinion about the issue.
The behavior of auto-indentation within things like <pre>...</pre> (or
here-docs in sh scripts, or strings in other languages, ...) is indeed
not perfect, is inconsistent between major modes, and moreover it's
always clear what is the best behavior.
I think what should happen is:
- indent-region should not modify those lines.
- indent-according-to-mode should not modify those lines either.
- indent-for-tab-command should behave as if in text-mode (i.e. call
something like indent-relative).
Ideally, this should be recognized and treated as a case of "multiple
major modes" and you should even be able to specify what major mode
to use within the <pre>...</pre> region, so that the indentation there
can be better than text-mode's.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#8515: M-x indent-region should skip everything between <pre>-tags.
2011-04-19 12:59 ` Stefan Monnier
@ 2011-04-19 13:45 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2011-04-19 13:45 UTC (permalink / raw)
To: Rob Browning; +Cc: 8515, Juhapekka Tolvanen, 448563-forwarded
> The behavior of auto-indentation within things like <pre>...</pre> (or
> here-docs in sh scripts, or strings in other languages, ...) is indeed
> not perfect, is inconsistent between major modes, and moreover it's
> always clear what is the best behavior.
^^^
not
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-19 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 18:57 bug#8515: M-x indent-region should skip everything between <pre>-tags Rob Browning
2011-04-19 12:59 ` Stefan Monnier
2011-04-19 13:45 ` Stefan Monnier
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.