From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11832: 24.1.50; enhancement request: line truncation not dependent on fringe Date: Sun, 1 Jul 2012 09:52:48 -0700 Message-ID: References: <560E2AFCD13442E1A1291714EEA5F487@us.oracle.com> <831ukv79b7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341161621 25683 80.91.229.3 (1 Jul 2012 16:53:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2012 16:53:41 +0000 (UTC) Cc: 11832@debbugs.gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 18:53:40 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SlNP0-0006xX-FS for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 18:53:38 +0200 Original-Received: from localhost ([::1]:41182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlNOz-0007mk-IY for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 12:53:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlNOw-0007mL-0V for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 12:53:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlNOu-0002S3-3F for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 12:53:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlNOt-0002Rz-Vr for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 12:53:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SlNTF-0006Py-V1 for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 12:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jul 2012 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11832-submit@debbugs.gnu.org id=B11832.134116185624633 (code B ref 11832); Sun, 01 Jul 2012 16:58:01 +0000 Original-Received: (at 11832) by debbugs.gnu.org; 1 Jul 2012 16:57:36 +0000 Original-Received: from localhost ([127.0.0.1]:40537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlNSp-0006PF-Ho for submit@debbugs.gnu.org; Sun, 01 Jul 2012 12:57:35 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:40245) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SlNSn-0006P7-D0 for 11832@debbugs.gnu.org; Sun, 01 Jul 2012 12:57:34 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q61Gr051029086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 Jul 2012 16:53:01 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q61Gr0MU022862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Jul 2012 16:53:00 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q61GqxAu008136; Sun, 1 Jul 2012 11:52:59 -0500 Original-Received: from dradamslap1 (/10.159.223.217) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 01 Jul 2012 09:52:59 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <831ukv79b7.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac1Xo9ncfAIl040ySuerIhHUtmsV4gAA80jg X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61466 Archived-At: > Just for the sake of accuracy: those are not overlays (in the Emacs > sense). They are special glyphs inserted by the display engine as > indication of line truncation. Thank you. I wondered about that. I even searched the C code, but I didn't find any occurrence of "$" or its char number. I just guessed that an overlay was used, as it did not seem to be just text in the buffer. > > In Emacs 21+, this representation was lost AFAIK, replaced > > by adding a symbol to the right fringe. > > Only in GUI sessions. If you invoke "emacs -nw", you will still see > those truncation glyphs. OK, it was lost only in GUI sessions. And the fact that it is kept for non-GUI, instead of simply truncating the text with no truncation indicator, argues strongly in favor of it for GUI too whenever the right fringe is not shown. > > Please let users choose the representation to use. One way > > to do this would be to let option `truncate-lines' respect > > different non-nil values, e.g. `right-fringe', `overlay'. > > > > Since the fringe representation is not general (is useless > > unless fringe is shown), the default should be the pre-Emacs > > 21 behavior of using an overlay. But I won't argue about the > > default. Please provide users a way to get the pre-21 behavior > > - that's the main point. > > Unfortunately, it is very hard (a.k.a. "impossible") to do that. The > problem is that, depending on the font and the characters on a line, a > line can be truncated in the middle of a glyph, and in that situation > inserting a truncation glyph will not work, because for that you need > a character cell that can accommodate the truncation glyph "$". There > are clear comments about that in the display code. You seem to be saying that the result will not look good in 100% of the situations users will encounter. Still, some user choice in the matter is a lot better than none. If a user does not like what s?he sees she can revert to the more limited display - IOW, s?he can _choose_ what is today a non-choice. Turn off fringe display and you will quickly see what I mean: there is _nothing_ to distinguish a truncated line from one that is not truncated. That is not good. Imagine if that were the choice for non-GUI Emacs - what would your reaction be? > However, if someone finds a clever solution to this dilemma, patches > or ideas are welcome. Just sacrifice 100% perfection. Give users the choice, at least. We should not wait for someone to "find a clever solution to this dilemna". That sounds like a recipe for doing nothing forever. Pre-fringe Emacs (18...20) had it right. As soon as someone added fringe we lost this (baby...bathwater). Even if Emacs now handles glyphs or whatever differently than it did in Emacs 20, and even if the partial solution you describe will not be perfect, it will be a heck of a lot better than having _no_ indication of which lines are truncated. This is all the more important because line truncation can be used to reduce horizontal real estate, whereas showing the fringe increases the real estate used. The Emacs 18...20 display used a minimal amount of horizontal space (like the non-GUI display does still). That should be an option for users.