From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56683: 29.0.50; long lines fix doesn't work correctly when lines are truncated Date: Fri, 22 Jul 2022 09:13:59 +0300 Message-ID: <83y1wlllnc.fsf@gnu.org> References: <87h73ab8bo.fsf@gmail.com> <83zgh2kzlo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31186"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org To: Gregory Heytings , Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 08:15:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oElwS-0007w9-H9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 08:15:16 +0200 Original-Received: from localhost ([::1]:50924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oElwQ-00027d-HC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 02:15:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oElwE-00027V-AV for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 02:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oElwE-0000T6-1L for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 02:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oElwD-0003sr-Ou for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 02:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2022 06:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56683 X-GNU-PR-Package: emacs Original-Received: via spool by 56683-submit@debbugs.gnu.org id=B56683.165847045714850 (code B ref 56683); Fri, 22 Jul 2022 06:15:01 +0000 Original-Received: (at 56683) by debbugs.gnu.org; 22 Jul 2022 06:14:17 +0000 Original-Received: from localhost ([127.0.0.1]:39898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oElvT-0003rR-7S for submit@debbugs.gnu.org; Fri, 22 Jul 2022 02:14:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oElvO-0003r8-MW for 56683@debbugs.gnu.org; Fri, 22 Jul 2022 02:14:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oElvJ-0000Nv-6b; Fri, 22 Jul 2022 02:14:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=xKA4l5kgTNxTyk+KP3Mz00k+bTS4iOaeZaXKqCfiWM0=; b=RToDrMQ3DbvARGFB+CHA tKz5N/2q0C+Yf6KCAzpv1FXSOOa2NItUnLCDTC/FlFvqOSmSOCRlNsNvBlXxDZE158su6hoZdYGEg MQvTBOwUIax8qm66qzbOT88xUydoXTETHLqgtrba0FaBsTxmT2Ia0yu93WgDb3QV7pi9w3uU56iCM VeF7US2C9RBKDa2GUeJoDQ5K1Dvk030FC40Covavl5/1a1o0rvUuJgIkWgH/S/kIc85OR/htxNVKJ fNi02zUzGs3mfI5yBj/J8k7EXwohVGdqQhFSIPk5sZErIqou+47MC8RhcuP+KzUfimwU0Q9zroSr2 CrpmPLieg80sHg==; Original-Received: from [87.69.77.57] (port=4277 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oElvI-00044v-MX; Fri, 22 Jul 2022 02:14:05 -0400 In-Reply-To: (message from Gregory Heytings on Thu, 21 Jul 2022 20:15:55 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237587 Archived-At: > Date: Thu, 21 Jul 2022 20:15:55 +0000 > From: Gregory Heytings > cc: andreyorst@gmail.com, 56683@debbugs.gnu.org > > > Is this related to the below (from xdisp.c)? > > > > #define DISP_INFINITY 10000000 > > > > Maybe we should make "infinity" somewhat larger? dictionary.json has a > > single line that is 18922365 characters long, so it's "more than > > infinity". > > It is indeed, setting DISP_INFINITY to 1000000000 "fixes" that bug. > But... how infinite is infinite? (A near-philosophical question 😉) > With a somewhat larger file (that one is only 20 MB) we'd have to increase > it again. If that's a hard-coded limit, I guess it's a sign that we > should advise against using toggle-truncate-lines in buffer with long > lines. We could enlarge the value to INT_MAX, or even make the X-coordinate members of the iterator structure have the type ptrdiff_t and then DISP_INFINITY could be PTRDIFF_MAX (which would be undesirable in general for performance reasons). But that would not solve the problem completely, because the value is in pixels. So with the largest possible line length, which is EMACS_INT_MAX characters long, we'd need at least 7 or 8 times that for the X-coordinate values, and we don't have that even in 64-bit builds. If we want to advise against truncate-lines in such buffers, perhaps toggle-truncate-lines should ask for confirmation in such cases, and the documentation should mention the limitation. Gerd, any ideas or comments?