From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Thu, 8 Aug 2019 10:15:53 +0200 Message-ID: <20190808081553.5dpwuomixtyhixcc@Ergus> References: <20190807005411.qfzzpz5cjrajbwn2@Ergus> <83o911aukn.fsf@gnu.org> <20190807153220.ssijgjxnf6dszz45@Ergus> <83k1bpasic.fsf@gnu.org> <20190807155738.yviofsumjjhqueci@Ergus> <83imr9ar9f.fsf@gnu.org> <0975890b-37b4-428d-f6e5-5dcf894fb6be@gmx.at> <83ftmdapxm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215559"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: martin rudalics , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 08 10:16:31 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hvdb4-000tyC-6I for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2019 10:16:30 +0200 Original-Received: from localhost ([::1]:47508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvdb2-0001yr-H2 for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2019 04:16:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35370) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvdag-0001rh-PL for emacs-devel@gnu.org; Thu, 08 Aug 2019 04:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvdae-0002aA-K8 for emacs-devel@gnu.org; Thu, 08 Aug 2019 04:16:06 -0400 Original-Received: from sonic313-22.consmr.mail.ir2.yahoo.com ([77.238.179.189]:38467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvdab-0002WD-Fh for emacs-devel@gnu.org; Thu, 08 Aug 2019 04:16:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1565252158; bh=D0pZ7BOWMhsxunFPKueeIGUtMreoIAsxTaa73GzLzg0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=Q7Aekbfr73QtnUTHDznEUAs3Vdf6M6Daeql7AUxt3arVAfRLn3Rzzh0VFHf59syfnS6RBwmkJvzJr7LYgvaubrKzXgviflarGSChH2k94I8dJUrd3vnLPWqdHAl9ATWJUKSHT2p+hzv3QH2Gtyqr6Sp2lNw9PNKOjyGBpxwP1iwTLopu0BAaabxGqkUphAIfraOpaxMWapkWO5Tst5Y+h4brlCCMVFlhnt4IabPdlRSUcfWuROenSSN5nWUCffvHP/D/h6NxlkhmHIYEnk/cC4NC9zUe+w5Wpsjbx3Lv6HQCDr3RgyGTljUxmbOZzL1G0YR1x/P8/KF+mDSuOsfZhQ== X-YMail-OSG: d0Ul1TUVM1mMSjENFI2jmFrHp1GWO6MKH9AwBR1VAGvjTy.l1Wypko1f5aL8oIe uCCC2gdhAu_OayPWjcGexvSawW3LI0cqRovs6ZLDThL67qPGwznXyNpN._5PTUD6.PSigUkUDDwT 9_q5Y7kFjnpGzREtqFKZHURsxf3zjbv.evMHm_ZHixnSDBX8ku0QIV6.45y9jR3Zk_0eLlDIK6bM pDuuEg4kl1THbh2wf2ycXdq7YncG_oLgHf_IITYLcsog2CTHL7Jqan5zd71eV4LiQEFKsNpVx2cG rxWXwLMkcOQl7enL0IrD91RSmdpjE.IGZK73cRsb7jQP5L6sf_F.6Ed6m.Duc5njQCtn6Y9QFNJO mrwmEXTqibG0rCCcpwlGz0jGwsU2Ai057nbJQTwkfYI1UIxBoj8GLGaHmxbbR1uZqENDM2XSWNb4 1skP8zgW57ydaOQUVUqjB3wxsw1oTBWO5onyClHVhkaFuQaoSMl_.3XfsLIp6C4i0638cYsKEru7 KfkU8rod6xdsD0PGkDrz4hzBbgiOpQyN8gICRfTjhyVBpnbGtHOUyoD8FgNlrEWvhQMVg7oVZGRz d9CgdPHRV8spB5er9jG4CM21STb2Ibyu_0uR_y17GMIv1nmbZzn7wgCxB3yCgw5HERUc.9lZLP7w CbY_rbbGNWgceCPghb7.pyXzTg8GNo7EpPs9CwqhlI.9_D9Rrm5tNk37IfZ3DQfYL__TnuSL2oll h0Y5Di_EnqrcdrxfdTqIKGWRW0KEwJm2rKL2xuEbZ0JrNy5wkylikMdxWEaAuPpEEpJ4.Wc8Su6v uOT3eyevL1bY1vPV.SK8JZLt0lALNNw43Qlp2Dlwow Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Thu, 8 Aug 2019 08:15:58 +0000 Original-Received: by smtp422.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 34ec9a050b50c1f167068d9d9b266f91; Thu, 08 Aug 2019 08:15:56 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83ftmdapxm.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.179.189 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239239 Archived-At: On Wed, Aug 07, 2019 at 07:41:25PM +0300, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: martin rudalics >> Date: Wed, 7 Aug 2019 18:25:37 +0200 >> >> > And, of course, this leaves the more general problem I described in my >> > message: what is the right behavior for extending the face that >> > crosses a newline. (Note that the display engine in general doesn't >> > know whether a face that doesn't end before a newline will or won't >> > continue on the next screen line.) >> >> Recalling your proposal >> >> (defcustom face-extend-to-window-edge t >> "Non-nil means extend face of last character on line to window edge. > >Thanks for the reminder. > >> Certain face attributes, if present in the face of the last character >> of a line and different from those of the default face, cause the >> empty space following the end of text on the line to be drawn with >> those attributes, to give the empty space appearance similar to that >> of the preceding text. These attributes are those which affect the >> background of a face: `:background', `:stipple', `:box', `:underline', >> `:overline', and `:strike-through'. By default, if the face of a >> line's last character has any of these attributes, and the value is >> different from that of the default face, the empty space following the >> line's text will be drawn in the face of the last character. > >This is inaccurate, I think: on GUI frames only :background and :box >are extended all the way, the rest only "infect" the glyph we add for >displaying the newline. > >> This variable allows fine-tuning which attributes trigger the face >> extension. The default value of t means any of the mentioned >> attributes will cause face extension. The value of nil means face >> extension is turned off. A value that is a list of attributes will >> extend the face only if any of the attributes from the list are >> present in the last character's face. Note that only attributes from >> the above list are meaningful in list values of this variable.") >> >> in the discussion of Bug#23574. > >And I think we need to consider the case of the region using one of >the attributes that are not in the list. > In gui our actual behavior seems to be very reasonable and simple (And we haven't too many complains about this.). It extends the region colors, but not the underline (and similes). For me this makes sense because underline empty spaces after \n, until the page border, does not really means anything as conceptually there is nothing that should be underlined there. The "surprise" is that there is no code for this effect in the display engine and it has to do with some X||gtk feature in use. (That's why I needed to ad an extra glyph after the indicator.) Comparing around: VIM, when toggle to visual mode it only highlights the real text. The rest of the line stays unchanged. This is useful to detect trailing whitespaces when no set by default (I am not telling that we should adopt that approach, but it looks very reasonable and simple and it is the default in most gui libraries; so also for the users) Geany, QtCreator, Sublime, Web Browsers (Firefox, chromium), MS Word, all of them do the same. Eclipse, on the other hand, extends the color to the end of the line as we do, but it only allows to set background and foreground to what we call region. So no underlined region to worry about. I think that these are the most extended approaches around (so we don't need to reinvent the wheel) and Eli should make the design choice so we/he can start implementing that; otherwise it will be forgotten after hours and hours of arguments and at the end there will be always somebody unhappy.