GNU bug report logs - #8515
M-x indent-region should skip everything between <pre>-tags.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Rob Browning <rlb@HIDDEN>; dated Sun, 17 Apr 2011 18:58:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 8515 <at> debbugs.gnu.org:


Received: (at 8515) by debbugs.gnu.org; 19 Apr 2011 13:45:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 09:45:46 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QCBFR-0003Os-GM
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2011 09:45:46 -0400
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1QCBFQ-0003Og-1c
	for 8515 <at> debbugs.gnu.org; Tue, 19 Apr 2011 09:45:44 -0400
Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:49724
	helo=ceviche.home)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <monnier@HIDDEN>)
	id 1QCBFK-0001Z4-BD; Tue, 19 Apr 2011 09:45:38 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 60062662B5; Tue, 19 Apr 2011 10:45:36 -0300 (ART)
From: Stefan Monnier <monnier@HIDDEN>
To: Rob Browning <rlb@HIDDEN>
Subject: Re: bug#8515: M-x indent-region should skip everything between
	<pre>-tags.
Message-ID: <jwvfwpeuzgv.fsf-monnier+emacs@HIDDEN>
References: <87r5909043.fsf@HIDDEN>
	<jwvmxjmwger.fsf-monnier+emacs@HIDDEN>
Date: Tue, 19 Apr 2011 10:45:36 -0300
In-Reply-To: <jwvmxjmwger.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Tue, 19 Apr 2011 09:59:13 -0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 8515
Cc: 8515 <at> debbugs.gnu.org, Juhapekka Tolvanen <juhtolv@HIDDEN>,
	448563-forwarded@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)

> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8515; Package emacs. Full text available.

Message received at 8515 <at> debbugs.gnu.org:


Received: (at 8515) by debbugs.gnu.org; 19 Apr 2011 12:59:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 08:59:27 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QCAWc-0002MA-HE
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2011 08:59:26 -0400
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1QCAWZ-0002Lw-Ky
	for 8515 <at> debbugs.gnu.org; Tue, 19 Apr 2011 08:59:24 -0400
Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:52268
	helo=ceviche.home)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <monnier@HIDDEN>)
	id 1QCAWT-0007pX-EB; Tue, 19 Apr 2011 08:59:17 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 623CE662E4; Tue, 19 Apr 2011 09:59:13 -0300 (ART)
From: Stefan Monnier <monnier@HIDDEN>
To: Rob Browning <rlb@HIDDEN>
Subject: Re: bug#8515: M-x indent-region should skip everything between
	<pre>-tags.
Message-ID: <jwvmxjmwger.fsf-monnier+emacs@HIDDEN>
References: <87r5909043.fsf@HIDDEN>
Date: Tue, 19 Apr 2011 09:59:13 -0300
In-Reply-To: <87r5909043.fsf@HIDDEN> (Rob Browning's message
	of "Sun, 17 Apr 2011 13:57:48 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 8515
Cc: 8515 <at> debbugs.gnu.org, Juhapekka Tolvanen <juhtolv@HIDDEN>,
	448563-forwarded@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)

> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8515; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Apr 2011 18:58:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 17 14:58:02 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QBXAX-0008QV-81
	for submit <at> debbugs.gnu.org; Sun, 17 Apr 2011 14:58:01 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rlb@HIDDEN>) id 1QBXAV-0008QH-7J
	for submit <at> debbugs.gnu.org; Sun, 17 Apr 2011 14:57:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rlb@HIDDEN>) id 1QBXAP-0007FK-0N
	for submit <at> debbugs.gnu.org; Sun, 17 Apr 2011 14:57:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,FAKE_REPLY_C,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:50304)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rlb@HIDDEN>) id 1QBXAO-0007FE-V8
	for submit <at> debbugs.gnu.org; Sun, 17 Apr 2011 14:57:52 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38476)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rlb@HIDDEN>) id 1QBXAO-0003jC-0r
	for bug-gnu-emacs@HIDDEN; Sun, 17 Apr 2011 14:57:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rlb@HIDDEN>) id 1QBXAM-0007Eu-J6
	for bug-gnu-emacs@HIDDEN; Sun, 17 Apr 2011 14:57:51 -0400
Received: from defaultvalue.org ([70.85.129.156]:48752)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rlb@HIDDEN>) id 1QBXAM-0007Eo-DR
	for bug-gnu-emacs@HIDDEN; Sun, 17 Apr 2011 14:57:50 -0400
Received: from omen.defaultvalue.org (localhost [127.0.0.1])
	by defaultvalue.org (Postfix) with ESMTP id 265BA90D35;
	Sun, 17 Apr 2011 13:59:19 -0500 (CDT)
Received: from raven.defaultvalue.org (raven.defaultvalue.org [192.168.1.7])
	by omen.defaultvalue.org (Postfix) with ESMTP id 82B005006C;
	Sun, 17 Apr 2011 13:57:48 -0500 (CDT)
Received: by raven.defaultvalue.org (Postfix, from userid 1000)
	id 6F9CB7BAB9F; Sun, 17 Apr 2011 13:57:48 -0500 (CDT)
From: Rob Browning <rlb@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Re: M-x indent-region should skip everything between <pre>-tags.
Date: Sun, 17 Apr 2011 13:57:48 -0500
Message-ID: <87r5909043.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.1 (-----)
X-Debbugs-Envelope-To: submit
Cc: 448563-forwarded@HIDDEN, Juhapekka Tolvanen <juhtolv@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.1 (-----)

(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




Acknowledgement sent to Rob Browning <rlb@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8515; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.