From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#5437: C-q reformat and Autofill error Date: Fri, 22 Jan 2010 11:41:28 -0500 Message-ID: <87d412ks7b.fsf@stupidchicken.com> References: <8bd354bf1001210850i229a8be5r6522dd7372946674@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264180664 24677 80.91.229.12 (22 Jan 2010 17:17:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2010 17:17:44 +0000 (UTC) Cc: 5437@debbugs.gnu.org To: Jayson Williams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 22 18:17:28 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NYN8R-0005Ez-8G for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jan 2010 18:17:28 +0100 Original-Received: from localhost ([127.0.0.1]:55418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYN7z-0003np-6Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jan 2010 12:16:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYN0w-0007qk-3E for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2010 12:09:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYN0r-0007l3-K6 for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2010 12:09:41 -0500 Original-Received: from [199.232.76.173] (port=41038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYN0r-0007kq-9g for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2010 12:09:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52580) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NYN0q-0007c4-RR for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2010 12:09:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NYMa9-0000QC-J8; Fri, 22 Jan 2010 11:42:01 -0500 X-Loop: bug-gnu-emacs@gnu.org In-Reply-To: <8bd354bf1001210850i229a8be5r6522dd7372946674@mail.gmail.com> Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2010 16:42:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5437 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5437-submit@debbugs.gnu.org id=B5437.12641784951610 (code B ref 5437); Fri, 22 Jan 2010 16:42:01 +0000 Original-Received: (at 5437) by debbugs.gnu.org; 22 Jan 2010 16:41:35 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NYMZi-0000Pv-NB for submit@debbugs.gnu.org; Fri, 22 Jan 2010 11:41:34 -0500 Original-Received: from pantheon-po34.its.yale.edu ([130.132.50.80]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NYMZh-0000Pn-82 for 5437@debbugs.gnu.org; Fri, 22 Jan 2010 11:41:33 -0500 Original-Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po34.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0MGfS7d009931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 22 Jan 2010 11:41:28 -0500 Original-Received: by furry (Postfix, from userid 1000) id 80ADCC05D; Fri, 22 Jan 2010 09:41:28 -0700 (MST) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.9 (--) Resent-Date: Fri, 22 Jan 2010 11:42:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34629 Archived-At: > When I edit the beginning of the first line with an "-" character, and > reformat using M-q, I expected all the lines to be indented > > Instead, after adding the '-' at the beginning, and reformatting with > M-q, what I get is normal wrapping of the text > > This appears to be a bug, because it only seems to happens when the > first line of the text is edited after the fact. If I include the '-' > character when I first start typing the multiple lines, I get the > indented wrapping that I expected. Additionally if I join the lines > back together, and then type M-q, I get the expected indented > wrapping. This is not a bug, it's part of the indentation logic. Emacs has no way of knowing whether you intend to indent like this: - foo goo... bar baz... or like this: - foo goo... bar baz... Clearly, each indentation could be valid under different circumstances, and Emacs must not impose one single choice when M-q is typed. So, if you start out with a long line that is not already indented, it will try option 2. But if you start out with either choice, it will stick with that choice.