From unknown Thu Jun 12 08:43:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29594: Emacs 26 -- xdisp.c:21657 OR xdisp.c:21671? Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Dec 2017 21:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29594 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 29594@debbugs.gnu.org X-Debbugs-Original-To: Emacs Bug Reports Received: via spool by submit@debbugs.gnu.org id=B.151259698231026 (code B ref -1); Wed, 06 Dec 2017 21:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Dec 2017 21:49:42 +0000 Received: from localhost ([127.0.0.1]:49604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMhZW-00084M-Ag for submit@debbugs.gnu.org; Wed, 06 Dec 2017 16:49:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMhZT-000848-U5 for submit@debbugs.gnu.org; Wed, 06 Dec 2017 16:49:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMhZN-000393-R6 for submit@debbugs.gnu.org; Wed, 06 Dec 2017 16:49:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eMhZN-00038v-NM for submit@debbugs.gnu.org; Wed, 06 Dec 2017 16:49:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMhZM-0008LN-EZ for bug-gnu-emacs@gnu.org; Wed, 06 Dec 2017 16:49:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMhZJ-00035S-9w for bug-gnu-emacs@gnu.org; Wed, 06 Dec 2017 16:49:32 -0500 Received: from gateway30.websitewelcome.com ([192.185.145.3]:44454) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eMhZJ-00034n-1w for bug-gnu-emacs@gnu.org; Wed, 06 Dec 2017 16:49:29 -0500 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id BF8D1D89A for ; Wed, 6 Dec 2017 15:49:25 -0600 (CST) Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id MhZFefprN0aRHMhZFeAm2Z; Wed, 06 Dec 2017 15:49:25 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ce4jHejP+FolcYZBsFL1gJnsMgLz8zIIQ6P1eawbKIU=; b=aiwApsWAQGshI/u03C+GD5l1s2 flPH47aJMb8XxByr7bopyN1dctpmiazDG+4WLffSl6PTqCoBebydgORvHFuXFiBFE170nXl/RKvyh a+n4tu6iNWZoWNs1YEEdGIgwFFPay/w57gd5bX5ZChBBobfH7NCP2ToiiNmwTwUcWj84cKxSeBOOx aBthKCmMsljaKzs4enSFWYNfYWKpMzDie+xiNKW12hCvevl5rS5G/B4s2IQzxWxTWI0o2Y3iTrwzO /VyJybWXdGjJiIqvKEd2C/qOSYYPm0tJXoxedoW0RTERRKvPihpaAc+tcWchpxhnn3Scdn63Qtmcm 9ZG3fvFQ==; Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51166 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1eMhZE-001NIi-Ni for bug-gnu-emacs@gnu.org; Wed, 06 Dec 2017 15:49:24 -0600 Date: Wed, 06 Dec 2017 13:49:24 -0800 Message-ID: From: Keith David Bershatsky MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1eMhZE-001NIi-Ni X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:51166 X-Source-Auth: lawlist X-Email-Count: 2 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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. There is an ongoing thread on Emacs Devel relating to this section of code (among one other location) affecting the calculation of it->pixel_width at xdisp.c:28212; however, that discussion may or may not yet be ripe for a bug report: https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00209.html Thanks, Keith From unknown Thu Jun 12 08:43:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29594: Emacs 26 -- xdisp.c:21657 OR xdisp.c:21671? 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: To: Keith David Bershatsky Cc: 29594@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 29594-submit@debbugs.gnu.org id=B29594.151282389528019 (code B ref 29594); Sat, 09 Dec 2017 12:52:01 +0000 Received: (at 29594) by debbugs.gnu.org; 9 Dec 2017 12:51:35 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Sat, 09 Dec 2017 14:51:04 +0200 Message-Id: <83zi6st687.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Keith David Bershatsky on Wed, 06 Dec 2017 13:49:24 -0800) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 09 15:51:36 2017 Received: (at control) by debbugs.gnu.org; 9 Dec 2017 20:51:36 +0000 Received: from localhost ([127.0.0.1]:54153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNm5w-0001U3-Fy for submit@debbugs.gnu.org; Sat, 09 Dec 2017 15:51:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNm5v-0001Tp-Dh for control@debbugs.gnu.org; Sat, 09 Dec 2017 15:51:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNm5p-0004Ry-NQ for control@debbugs.gnu.org; Sat, 09 Dec 2017 15:51:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNm5p-0004RX-JS for control@debbugs.gnu.org; Sat, 09 Dec 2017 15:51:29 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eNm5p-0000sZ-Ae for control@debbugs.gnu.org; Sat, 09 Dec 2017 15:51:29 -0500 Subject: control message for bug 29594 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sat, 09 Dec 2017 15:51:29 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) # 1056b3cbcd close 29594 26.0.91