From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29594: Emacs 26 -- xdisp.c:21657 OR xdisp.c:21671? Date: Sat, 09 Dec 2017 14:51:04 +0200 Message-ID: <83zi6st687.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1512823930 7628 195.159.176.226 (9 Dec 2017 12:52:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Dec 2017 12:52:10 +0000 (UTC) Cc: 29594@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 09 13:52:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNebt-0001np-3s for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 13:52:05 +0100 Original-Received: from localhost ([::1]:41057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNec0-0003Jx-Ek for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 07:52:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNebt-0003ES-Ft for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 07:52:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNebq-0007AB-69 for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 07:52:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNebq-0007A5-2s for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 07:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNebp-0007IX-Sa for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 07:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2017 12:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29594 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29594-submit@debbugs.gnu.org id=B29594.151282389528019 (code B ref 29594); Sat, 09 Dec 2017 12:52:01 +0000 Original-Received: (at 29594) by debbugs.gnu.org; 9 Dec 2017 12:51:35 +0000 Original-Received: from localhost ([127.0.0.1]:53193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNebO-0007Hr-Or for submit@debbugs.gnu.org; Sat, 09 Dec 2017 07:51:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNebN-0007Hf-AC for 29594@debbugs.gnu.org; Sat, 09 Dec 2017 07:51:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNebC-00072F-Cq for 29594@debbugs.gnu.org; Sat, 09 Dec 2017 07:51:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNebC-000724-9Q; Sat, 09 Dec 2017 07:51:22 -0500 Original-Received: from [176.228.60.248] (port=4361 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eNebB-0000E1-KB; Sat, 09 Dec 2017 07:51:22 -0500 In-reply-to: (message from Keith David Bershatsky on Wed, 06 Dec 2017 13:49:24 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140855 Archived-At: > Date: Wed, 06 Dec 2017 13:49:24 -0800 > From: Keith David Bershatsky > > In the Emacs 26 branch downloaded this morning, I see: > > xdisp.c:21657 > it->continuation_lines_width += wrap_x; > > and, I see: > > xdisp.c:21671 > it->continuation_lines_width += x; > > If only one of these is needed, then it may be appropriate to remove whichever one is not needed. I understand that the second occurrence supersedes the first occurrence in this section of code, but it would be cleaner if there were only one setting. If both occurrences are needed, then perhaps a comment in the code at that particular location would be helpful. This is a bug, and a very old one: the second increment should not be done. This bug was introduced when the word-wrap feature was added to Emacs, 9 years ago. It could only remain undetected for such a long time because the numerical value of continuation_lines_width is almost never used, most of the code only cares whether the value is zero or positive. Thanks for pointing this out, I've now fixed this on the release branch.