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#5018: 23.1.50; Feature request: truncate-lines text property Date: Mon, 05 Jun 2017 18:42:12 +0300 Message-ID: <83fufea1bf.fsf@gnu.org> References: <83vaoba80r.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496677395 11936 195.159.176.226 (5 Jun 2017 15:43:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2017 15:43:15 +0000 (UTC) Cc: 5018@debbugs.gnu.org To: Michael Brand Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 05 17:43:10 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 1dHu9u-0002ou-A5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jun 2017 17:43:10 +0200 Original-Received: from localhost ([::1]:33961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHu9z-0006we-4X for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jun 2017 11:43:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHu9p-0006u4-UH for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 11:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHu9m-00061A-Np for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 11:43:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHu9m-000613-Jc for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 11:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHu9m-0002N3-Dk for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 11:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jun 2017 15:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5018 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5018-submit@debbugs.gnu.org id=B5018.14966773529078 (code B ref 5018); Mon, 05 Jun 2017 15:43:02 +0000 Original-Received: (at 5018) by debbugs.gnu.org; 5 Jun 2017 15:42:32 +0000 Original-Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHu9I-0002MM-CD for submit@debbugs.gnu.org; Mon, 05 Jun 2017 11:42:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHu9G-0002M8-Q2 for 5018@debbugs.gnu.org; Mon, 05 Jun 2017 11:42:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHu98-0005Qf-Da for 5018@debbugs.gnu.org; Mon, 05 Jun 2017 11:42:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHu98-0005Qb-9i; Mon, 05 Jun 2017 11:42:22 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1278 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHu97-0002he-CI; Mon, 05 Jun 2017 11:42:21 -0400 In-reply-to: (message from Michael Brand on Mon, 5 Jun 2017 11:29:54 +0200) 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:133303 Archived-At: > From: Michael Brand > Date: Mon, 5 Jun 2017 11:29:54 +0200 > Cc: 5018@debbugs.gnu.org > > > Would you like to work on implementing this feature? I can provide > > guidance if needed. > > I can try. Maybe too ambitious for me or at least for me alone. I am > new for example to the style of C in Emacs and to the display engine. > And as usual for everybody my time is limited but as I have a need for > this feature since maybe years I could compensate a bit with patience > unless anybody wants to beat me. If you decide to try it, I suggest to start by looking at my recent changes that introduced hscrolling of only the current line. This feature should use similar techniques and touch the same places. > > . what text is supposed to have this property to mark the line as > > truncated, and how will Emacs know where the effect of the > > property ends? e.g., will we require the property to be set on > > the entire line, including the newline, or will it be enough to > > set it only on part of the line? > > The property only on \n looks good at first sight The property on a newline makes the preceding line truncated or the following line? If the former, than what about the last line in a buffer that doesn't end in a newline? Also, looking for the property in a very long line could slow down redisplay, since it would need to know about this when it gets to the first character of the line. > Anyway, I don't know if a text property will be the right solution in > the end. What other solution is possible? > > . when point moves along a line which is being truncated, and goes > > outside of the visible portion of the window, how do we want to > > hscroll the text in the window, in those parts that display lines > > which wrap? > > This made me think most. > > My first thought was: > > Truncate on the left in sync with truncated lines and rewrap on the > right > > : ################# > : trunc1 tr#$unc2 trunc3 t$# > : wrap1 wra#$p2 wrap3 wrap\# > : 4 wrap5 w#$rap6 wrap7 wr\# > : ap8 # # > : ################# > > would lower or avoid column-related problems like with rectangle edit > or ruler-mode. On the other hand I hope that changing what is the > buffer bottom line after rewrap would not call for other problems. > > But what would it help to wrap on the right when information is > already hidden on the left? So... > > My second thought is: > > Fall back to truncate all lines > > : ################# > : trunc1 tr#$unc2 trunc3 t$# > : wrap1 wra#$p2 wrap3 wrap$# > : more line#$s # > : even more#$ lines # > : ################# > > until column 0 becomes visible again is probably much easier, also for > the user to understand what happens. It could well be that the first variant is easier to implement. > Should this discussion move to emacs-devel to reach more developers? I'm not sure. Most if not all of the relevant people read the bug list as well. Perhaps post a short message to emacs-devel telling the interested people to read this discussion either via the bug tracker or via the bug-gnu-emacs list.