From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6738: possible bug in fill-paragraph Date: Mon, 02 Aug 2010 12:27:31 +0200 Message-ID: References: <19534.38013.458365.325249@ixian.com> <871vamgfu1.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280766472 5069 80.91.229.12 (2 Aug 2010 16:27:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 16:27:52 +0000 (UTC) Cc: Eric De Mund To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 02 18:27:50 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.69) (envelope-from ) id 1Ofxrd-0003eS-7y for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 18:27:46 +0200 Original-Received: from localhost ([127.0.0.1]:43690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofxfk-00068O-4n for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 12:15:28 -0400 Original-Received: from [140.186.70.92] (port=58305 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfxYu-0003rQ-B1 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 12:08:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfxYb-000129-Hp for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 12:08:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56886) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfxYb-000125-FE for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 12:08:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OfxMw-0006Bu-Sn for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 11:56:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2010 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 6738 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 6738@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by 6738-done@debbugs.gnu.org id=D6738.128076451823767 (code D ref 6738); Mon, 02 Aug 2010 15:56:02 +0000 Original-Received: (at 6738-done) by debbugs.gnu.org; 2 Aug 2010 15:55:18 +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 1OfxMD-0006BH-EV for submit@debbugs.gnu.org; Mon, 02 Aug 2010 11:55:18 -0400 Original-Received: from impaqm2.telefonica.net ([213.4.138.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfsEi-0003Cx-3n for 6738-done@debbugs.gnu.org; Mon, 02 Aug 2010 06:27:13 -0400 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm2.telefonica.net with bizsmtp id pJRz1e00L2jdgqJ3MNTZqe; Mon, 02 Aug 2010 12:27:33 +0200 Original-Received: from ceviche.home ([83.61.38.247]) by IMPmailhost5.adm.correo with BIZ IMP id pNTY1e0045KwfZf1lNTY7s; Mon, 02 Aug 2010 12:27:33 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id E1B6366125; Mon, 2 Aug 2010 12:27:31 +0200 (CEST) In-Reply-To: <871vamgfu1.fsf@escher.home> (Stephen Berman's message of "Thu, 29 Jul 2010 23:04:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Mailman-Approved-At: Mon, 02 Aug 2010 11:55:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 11:56:02 -0400 X-detected-operating-system: by eggs.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:39157 Archived-At: > It seems that the algorithm in justify-current-line doesn't work so well > for a two-word line: it correctly calculates the number of additional > space characters needed (ncols) but expects to fractionally distribute > them, as it does in the other lines, so it adds more space, in this case > wrongly. In such a situation, it suffices to just stick with ncols, as > in the following patch (but I haven't tested this in other cases, so > maybe it isn't the best fix). I've changed the curr-fracspace calculation instead. Not sure why it was doing a +1 on nspaces, and removing it fixes this problem (I'm not sure it doesn't introduce another one, but at least my tests lead me to think that's not the case). Stefan