all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Rob Browning <rlb@defaultvalue.org>
Cc: 8515@debbugs.gnu.org, Juhapekka Tolvanen <juhtolv@iki.fi>,
	448563-forwarded@bugs.debian.org
Subject: bug#8515: M-x indent-region should skip everything between <pre>-tags.
Date: Tue, 19 Apr 2011 09:59:13 -0300	[thread overview]
Message-ID: <jwvmxjmwger.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87r5909043.fsf@raven.defaultvalue.org> (Rob Browning's message of "Sun, 17 Apr 2011 13:57:48 -0500")

> 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





  reply	other threads:[~2011-04-19 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-04-19 13:45   ` Stefan Monnier

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=jwvmxjmwger.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=448563-forwarded@bugs.debian.org \
    --cc=8515@debbugs.gnu.org \
    --cc=juhtolv@iki.fi \
    --cc=rlb@defaultvalue.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.