GNU bug report logs - #6248
23.1; justify (esc q) broken in Latex mode

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; Reported by: mark.lillibridge@HIDDEN; dated Sat, 22 May 2010 17:53:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 6248) by debbugs.gnu.org; 4 Jun 2010 13:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 04 09:41:12 2010
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 1OKX95-000194-Vf
	for submit <at> debbugs.gnu.org; Fri, 04 Jun 2010 09:41:12 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OKX94-00018y-9e
	for 6248 <at> debbugs.gnu.org; Fri, 04 Jun 2010 09:41:10 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ao0FAIefCEzO+K4b/2dsb2JhbACSKIwXcr8/hRcEjF8
X-IronPort-AV: E=Sophos;i="4.53,361,1272859200"; d="scan'208";a="67293578"
Received: from 206-248-174-27.dsl.teksavvy.com (HELO pastel.home)
	([206.248.174.27])
	by ironport2-out.pppoe.ca with ESMTP; 04 Jun 2010 09:41:05 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id D876F81F8; Fri,  4 Jun 2010 09:41:04 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: mark.lillibridge@HIDDEN
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
Message-ID: <jwviq5yncl2.fsf-monnier+emacs@HIDDEN>
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
	<qmhbpc4ltct.fsf@HIDDEN>
	<jwvpr0kaeje.fsf-monnier+emacs@HIDDEN>
	<qmhvdaam58n.fsf@HIDDEN>
	<jwv8w76569e.fsf-monnier+emacs@HIDDEN>
	<qmhzkzbu3dd.fsf@HIDDEN>
Date: Fri, 04 Jun 2010 09:41:04 -0400
In-Reply-To: <qmhzkzbu3dd.fsf@HIDDEN> (Mark Lillibridge's message
	of "Thu, 03 Jun 2010 16:02:06 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
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: -2.1 (--)

>> Hmm... I see some problems with that:
>> - your original message reported that the whole paragraph was indented
>> (apparently by 4 spaces), so either that paragraph was not "outside
>> of any environment" or there is something I don't understand.

>     I think there is something else going on; that paragraph was
> contained in absolutely no environment.  As an experiment, I indented
> the first line only of the original paragraph by 20 spaces.  The result
> was that the entire paragraph is indented 20 spaces.  I can't think of
> any argument for why this makes sense.

Oh, I see what's going on: the filling only reindents the lines after
the first (i.e. only the lines that come after a newline inserted by the
filling code), and the filling code simply trusts the first line to be
properly indented.


        Stefan




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

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


Received: (at 6248) by debbugs.gnu.org; 3 Jun 2010 23:02:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 03 19:02:23 2010
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 1OKJQc-0007an-1A
	for submit <at> debbugs.gnu.org; Thu, 03 Jun 2010 19:02:23 -0400
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OKJQZ-0007ab-Uo
	for 6248 <at> debbugs.gnu.org; Thu, 03 Jun 2010 19:02:20 -0400
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id
	o53N28Ko021081
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 3 Jun 2010 16:02:09 -0700
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o53N26Xp023548; Thu, 3 Jun 2010 16:02:07 -0700
Date: Thu, 03 Jun 2010 16:02:06 -0700
Message-Id: <qmhzkzbu3dd.fsf@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwv8w76569e.fsf-monnier+emacs@HIDDEN> (message from Stefan
	Monnier on Thu, 27 May 2010 00:24:11 -0400)
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
	<qmhbpc4ltct.fsf@HIDDEN>
	<jwvpr0kaeje.fsf-monnier+emacs@HIDDEN>
	<qmhvdaam58n.fsf@HIDDEN>
	<jwv8w76569e.fsf-monnier+emacs@HIDDEN>
X-Scanned-By: MIMEDefang 2.67 on 15.0.48.190
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
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: -3.3 (---)


Stefan wrote:
>  So you're saying that filling should not use indentation when filling
>  top-level text and that would solve your use case?

    I think so; in particular, text at the top level not containing
latex commands should have the same filling rules as text in text mode.


>  Hmm... I see some problems with that:
>  - your original message reported that the whole paragraph was indented
>    (apparently by 4 spaces), so either that paragraph was not "outside
>    of any environment" or there is something I don't understand.

    I think there is something else going on; that paragraph was
contained in absolutely no environment.  As an experiment, I indented
the first line only of the original paragraph by 20 spaces.  The result
was that the entire paragraph is indented 20 spaces.  I can't think of
any argument for why this makes sense.

- Mark





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

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


Received: (at 6248) by debbugs.gnu.org; 27 May 2010 04:24:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 27 00:24:18 2010
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 1OHUdm-0006Cb-1c
	for submit <at> debbugs.gnu.org; Thu, 27 May 2010 00:24:18 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OHUdj-0006CW-M3
	for 6248 <at> debbugs.gnu.org; Thu, 27 May 2010 00:24:16 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ap0FADeR/UtLd+tS/2dsb2JhbACSGIwNcsAwhRMEjEQ
X-IronPort-AV: E=Sophos;i="4.53,308,1272859200"; d="scan'208";a="65566370"
Received: from 75-119-235-82.dsl.teksavvy.com (HELO pastel.home)
	([75.119.235.82])
	by ironport2-out.pppoe.ca with ESMTP; 27 May 2010 00:24:12 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id EB22080E5; Thu, 27 May 2010 00:24:11 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: mark.lillibridge@HIDDEN
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
Message-ID: <jwv8w76569e.fsf-monnier+emacs@HIDDEN>
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
	<qmhbpc4ltct.fsf@HIDDEN>
	<jwvpr0kaeje.fsf-monnier+emacs@HIDDEN>
	<qmhvdaam58n.fsf@HIDDEN>
Date: Thu, 27 May 2010 00:24:11 -0400
In-Reply-To: <qmhvdaam58n.fsf@HIDDEN> (Mark Lillibridge's message
	of "Wed, 26 May 2010 19:46:16 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
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: -2.0 (--)

>     I tend to view latex as text with intermixed code so I see this
> differently.  I can see an argument for why text inside of a specific
> environment might need to be indented specially, I don't see why that
> would apply to top-level text outside of any environment.

So you're saying that filling should not use indentation when filling
top-level text and that would solve your use case?

Hmm... I see some problems with that:
- your original message reported that the whole paragraph was indented
  (apparently by 4 spaces), so either that paragraph was not "outside
  of any environment" or there is something I don't understand.
- that would introduce unexpected difference between otherwise similar
  circumstances (top-level or not-top-level text).

>     I suspect we're going to agree to disagree on this one; feel free to
> close this bug.

Yes, I don't think we can satisfy everyone without someone having to do
some extra configuration to express his preference (which is what
fill-indent-according-to-mode is for).

But I could offer another "way out", based on your example text: the
indentation code could potentially be modified to try and recognize
paragraph-beginnings and indent them by some extra N spaces, so as to
look like:

         This is a sample paragraph of text that is long enough that it
     may need to be filled.  Here's a second sentence to continue the
     paragraph.  And one more sentence for good measure.

I personally wouldn't like it, so it would still need to be controlled
by some configuration variable.  And I'm not sure it could be made
reliable enough.


        Stefan




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

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


Received: (at 6248) by debbugs.gnu.org; 27 May 2010 02:46:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 26 22:46:29 2010
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 1OHT76-0005Z1-HP
	for submit <at> debbugs.gnu.org; Wed, 26 May 2010 22:46:28 -0400
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OHT74-0005Yw-Mf
	for 6248 <at> debbugs.gnu.org; Wed, 26 May 2010 22:46:27 -0400
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id
	o4R2kJEs001212
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 26 May 2010 19:46:20 -0700
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o4R2kGPZ020055; Wed, 26 May 2010 19:46:17 -0700
Date: Wed, 26 May 2010 19:46:16 -0700
Message-Id: <qmhvdaam58n.fsf@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvpr0kaeje.fsf-monnier+emacs@HIDDEN> (message from Stefan
	Monnier on Mon, 24 May 2010 22:43:00 -0400)
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
	<qmhbpc4ltct.fsf@HIDDEN>
	<jwvpr0kaeje.fsf-monnier+emacs@HIDDEN>
X-Scanned-By: MIMEDefang 2.67 on 15.0.152.124
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
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.3 (-----)


>  >> It's not a bug, it's a feature.  The change is because Emacs-21 did not
>  >> offer indentation for LaTeX, whereas Emacs>=22 does.
>  >> To get the behavior you want, you'll want to set
>  >> fill-indent-according-to-mode, e.g.
>  >> 
>  >> (add-hook 'latex-mode-hook
>  >> (lambda ()
>  >> (set (make-local-variable 'fill-indent-according-to-mode) nil)))
>  
>  >     While that workaround does work, I'm still not convinced this isn't
>  > a bug.  Why is this broken behavior a feature?  
>  
>  It's a feature if you consider LaTeX as code rather than as text, so you
>  want the text parts of the LaTeX code to be properly indented, like
>  any other.

    I tend to view latex as text with intermixed code so I see this
differently.  I can see an argument for why text inside of a specific
environment might need to be indented specially, I don't see why that
would apply to top-level text outside of any environment.

    I suspect we're going to agree to disagree on this one; feel free to
close this bug.

- Mark




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

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


Received: (at 6248) by debbugs.gnu.org; 25 May 2010 02:43:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 22:43:06 2010
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 1OGk6k-0007Hp-C9
	for submit <at> debbugs.gnu.org; Mon, 24 May 2010 22:43:06 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OGk6i-0007HR-Fx
	for 6248 <at> debbugs.gnu.org; Mon, 24 May 2010 22:43:04 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ai8FAF7V+ktFpZMM/2dsb2JhbACRd4wCcr4ChRMEjD8
X-IronPort-AV: E=Sophos;i="4.53,295,1272859200"; d="scan'208";a="64966409"
Received: from 69-165-147-12.dsl.teksavvy.com (HELO pastel.home)
	([69.165.147.12])
	by ironport2-out.pppoe.ca with ESMTP; 24 May 2010 22:43:00 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 8ACA48267; Mon, 24 May 2010 22:43:00 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: mark.lillibridge@HIDDEN
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
Message-ID: <jwvpr0kaeje.fsf-monnier+emacs@HIDDEN>
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
	<qmhbpc4ltct.fsf@HIDDEN>
Date: Mon, 24 May 2010 22:43:00 -0400
In-Reply-To: <qmhbpc4ltct.fsf@HIDDEN> (Mark Lillibridge's message
	of "Mon, 24 May 2010 17:26:10 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
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: -2.0 (--)

>> > Repeat the steps using instead a suffix of .tex (latex mode); this time
>> > you instead obtain the following incorrect result:
>> >
>> >     This is a sample paragraph of text that is long enough that it may
>> >     need to be filled.  Here's a second sentence to continue the
>> >     paragraph.  And one more sentence for good measure.
>> 
>> > Justify in latex mode worked correctly in Emacs 21, but does not work
>> > correctly in 22 or 23.  Please fix.
>> 
>> It's not a bug, it's a feature.  The change is because Emacs-21 did not
>> offer indentation for LaTeX, whereas Emacs>=22 does.
>> To get the behavior you want, you'll want to set
>> fill-indent-according-to-mode, e.g.
>> 
>> (add-hook 'latex-mode-hook
>> (lambda ()
>> (set (make-local-variable 'fill-indent-according-to-mode) nil)))

>     While that workaround does work, I'm still not convinced this isn't
> a bug.  Why is this broken behavior a feature?  

It's a feature if you consider LaTeX as code rather than as text, so you
want the text parts of the LaTeX code to be properly indented, like
any other.


        Stefan




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

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


Received: (at 6248) by debbugs.gnu.org; 25 May 2010 00:26:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 20:26:23 2010
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 1OGhyQ-0006Dn-N6
	for submit <at> debbugs.gnu.org; Mon, 24 May 2010 20:26:22 -0400
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OGhyN-0006Dh-VG
	for 6248 <at> debbugs.gnu.org; Mon, 24 May 2010 20:26:20 -0400
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id
	o4P0QDsv013916
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Mon, 24 May 2010 17:26:13 -0700
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o4P0QA3L020688; Mon, 24 May 2010 17:26:11 -0700
Date: Mon, 24 May 2010 17:26:10 -0700
Message-Id: <qmhbpc4ltct.fsf@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvljbbiepz.fsf-monnier+emacs@HIDDEN> (message from Stefan
	Monnier on Sat, 22 May 2010 21:37:06 -0400)
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
References: <qmh7hmv25ap.fsf@HIDDEN>
	<jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
X-Scanned-By: MIMEDefang 2.67 on 15.0.48.190
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
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: -3.3 (---)


Stefan wrote:
>  I (Mark) wrote:
>  > Repeat the steps using instead a suffix of .tex (latex mode); this time
>  > you instead obtain the following incorrect result:
>  >
>  >     This is a sample paragraph of text that is long enough that it may
>  >     need to be filled.  Here's a second sentence to continue the
>  >     paragraph.  And one more sentence for good measure.
>  
>  > Justify in latex mode worked correctly in Emacs 21, but does not work
>  > correctly in 22 or 23.  Please fix.
>  
>  It's not a bug, it's a feature.  The change is because Emacs-21 did not
>  offer indentation for LaTeX, whereas Emacs>=22 does.
>  To get the behavior you want, you'll want to set
>  fill-indent-according-to-mode, e.g.
>  
>   (add-hook 'latex-mode-hook
>             (lambda ()
>               (set (make-local-variable 'fill-indent-according-to-mode) nil)))

    While that workaround does work, I'm still not convinced this isn't
a bug.  Why is this broken behavior a feature?  

- Mark




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

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


Received: (at 6248) by debbugs.gnu.org; 23 May 2010 01:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 22 21:37:13 2010
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 1OG07t-0001bg-5I
	for submit <at> debbugs.gnu.org; Sat, 22 May 2010 21:37:13 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OG07r-0001bb-6w
	for 6248 <at> debbugs.gnu.org; Sat, 22 May 2010 21:37:11 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhkFAOci+EtFpZMM/2dsb2JhbACRfIwUcrwnhRMEjD8
X-IronPort-AV: E=Sophos;i="4.53,284,1272859200"; d="scan'208";a="64856485"
Received: from 69-165-147-12.dsl.teksavvy.com (HELO pastel.home)
	([69.165.147.12])
	by ironport2-out.pppoe.ca with ESMTP; 22 May 2010 21:37:06 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 910738175; Sat, 22 May 2010 21:37:06 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: mark.lillibridge@HIDDEN
Subject: Re: bug#6248: 23.1; justify (esc q) broken in Latex mode
Message-ID: <jwvljbbiepz.fsf-monnier+emacs@HIDDEN>
References: <qmh7hmv25ap.fsf@HIDDEN>
Date: Sat, 22 May 2010 21:37:06 -0400
In-Reply-To: <qmh7hmv25ap.fsf@HIDDEN> (Mark Lillibridge's message
	of "Sat, 22 May 2010 10:51:42 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 6248
Cc: 6248 <at> debbugs.gnu.org
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: -2.1 (--)

> Repeat the steps using instead a suffix of .tex (latex mode); this time
> you instead obtain the following incorrect result:

>     This is a sample paragraph of text that is long enough that it may
>     need to be filled.  Here's a second sentence to continue the
>     paragraph.  And one more sentence for good measure.

> Justify in latex mode worked correctly in Emacs 21, but does not work
> correctly in 22 or 23.  Please fix.

It's not a bug, it's a feature.  The change is because Emacs-21 did not
offer indentation for LaTeX, whereas Emacs>=22 does.
To get the behavior you want, you'll want to set
fill-indent-according-to-mode, e.g.

 (add-hook 'latex-mode-hook
           (lambda ()
             (set (make-local-variable 'fill-indent-according-to-mode) nil)))

-- Stefan




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

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


Received: (at submit) by debbugs.gnu.org; 22 May 2010 17:52:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 22 13:52:06 2010
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 1OFsrm-0006k7-LT
	for submit <at> debbugs.gnu.org; Sat, 22 May 2010 13:52:06 -0400
Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OFsrl-0006jl-TE
	for submit <at> debbugs.gnu.org; Sat, 22 May 2010 13:52:06 -0400
Received: from lists.gnu.org ([199.232.76.165]:33669)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OFsrh-0007w3-AZ
	for submit <at> debbugs.gnu.org; Sat, 22 May 2010 13:52:01 -0400
Received: from [140.186.70.92] (port=44194 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OFsrf-00078v-QY
	for bug-gnu-emacs@HIDDEN; Sat, 22 May 2010 13:52:00 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OFsre-000141-BU
	for bug-gnu-emacs@HIDDEN; Sat, 22 May 2010 13:51:59 -0400
Received: from gundega.hpl.hp.com ([192.6.19.190]:43548)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1OFsrd-00013T-UW
	for bug-gnu-emacs@HIDDEN; Sat, 22 May 2010 13:51:58 -0400
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.3/HPL-PA Relay) with ESMTP id
	o4MHpiIi017639
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <bug-gnu-emacs@HIDDEN>; Sat, 22 May 2010 10:51:44 -0700
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o4MHpgUN015508; Sat, 22 May 2010 10:51:42 -0700
Date: Sat, 22 May 2010 10:51:42 -0700
Message-Id: <qmh7hmv25ap.fsf@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.1; justify (esc q) broken in Latex mode
X-Scanned-By: MIMEDefang 2.67 on 15.0.48.190
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -5.3 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
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.3 (-----)


To reproduce the bug, paste the following text into a new .txt file:

====================  cut here  ====================
    This is a sample paragraph of text that is long enough that it may
need to be filled.  Here's a second sentence to continue the paragraph.  And one more
sentence for good measure.
====================  cut here  ====================

If you request justification via esc Q, the paragraph is reformatted to:

    This is a sample paragraph of text that is long enough that it may
need to be filled.  Here's a second sentence to continue the
paragraph.  And one more sentence for good measure.


Repeat the steps using instead a suffix of .tex (latex mode); this time
you instead obtain the following incorrect result:

    This is a sample paragraph of text that is long enough that it may
    need to be filled.  Here's a second sentence to continue the
    paragraph.  And one more sentence for good measure.


Justify in latex mode worked correctly in Emacs 21, but does not work
correctly in 22 or 23.  Please fix.

- Mark




Acknowledgement sent to mark.lillibridge@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#6248; 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: Fri, 31 Oct 2014 17:00:04 UTC

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