From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Line wrap reconsidered Date: Tue, 26 May 2020 23:04:08 +0300 Message-ID: <83imgitqdj.fsf@gnu.org> References: <92FF4412-04FB-4521-B6CE-52B08526E4E5@gmail.com> <83r1v7vmwy.fsf@gnu.org> <87imgjpihp.fsf@localhost> <83k10yvjlx.fsf@gnu.org> <83v9kiu08d.fsf@gnu.org> <167B04CA-E2EE-4D5B-8C65-250B4666461F@gmail.com> <83r1v6ttg8.fsf@gnu.org> <87r1v65x4s.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="60338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 26 22:05:17 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jdfp6-000Fak-Dt for ged-emacs-devel@m.gmane-mx.org; Tue, 26 May 2020 22:05:16 +0200 Original-Received: from localhost ([::1]:43770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdfp5-0003Oi-EF for ged-emacs-devel@m.gmane-mx.org; Tue, 26 May 2020 16:05:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdfoG-000247-T9 for emacs-devel@gnu.org; Tue, 26 May 2020 16:04:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51137) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdfoF-0000j6-DS; Tue, 26 May 2020 16:04:23 -0400 Original-Received: from [176.228.60.248] (port=4063 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdfoD-00036G-MB; Tue, 26 May 2020 16:04:22 -0400 In-Reply-To: <87r1v65x4s.fsf@localhost> (message from Ihor Radchenko on Wed, 27 May 2020 03:12:03 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251476 Archived-At: > From: Ihor Radchenko > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Wed, 27 May 2020 03:12:03 +0800 > > >> There is no way to know if some text is table or body without major mode adding text properties to distinguish them. > > Of course, there is: the major mode is the one that creates the table, > > doesn't it? So the mode knows where the table is. > > I think we misunderstand each other here. > I suggest to tell Emacs display backend not to wrap some text if the > text has certain text property. And I propose to do the opposite: force the display engine to wrap the lines that are outside the table, and otherwise turn on truncate-lines. I think this will be much easier to implement, and could even be done entirely in Lisp. By contrast, "selective line-wrap" of the kind that you envision is much harder to implement, especially with text properties. For starters, where would you put such a text property so that the display engine sees it with 100% guarantee when it needs to display the relevant lines? Keep in mind that redisplay could decide to examine only some portions of some lines in the window, it doesn't necessarily examine all the lines shown in the window. > Other cases include, for example, extremely long lines, which > would slow down Emacs if wrapped. Extremely long lines slow down Emacs even if truncated.