From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#23574: 24.5; Overzealous underlining in emacs-nox Date: Wed, 08 Jun 2016 08:33:30 +0200 Message-ID: <5757BC3A.5070402@gmx.at> References: <83porxwg1f.fsf@gnu.org> <83d1nxudrb.fsf@gnu.org> <83wpm3tyvn.fsf@gnu.org> <83twh7tt83.fsf@gnu.org> <83r3cbt5l3.fsf@gnu.org> <83h9d6tl3j.fsf@gnu.org> <5755AACE.8030303@gmx.at> <831t4ataep.fsf@gnu.org> <57568F86.8040902@gmx.at> <83eg89roam.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465367731 9852 80.91.229.3 (8 Jun 2016 06:35:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2016 06:35:31 +0000 (UTC) Cc: 23574@debbugs.gnu.org, john.b.mastro@gmail.com, cwoodbury@azavea.com, npostavs@users.sourceforge.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 08 08:35:20 2016 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 1bAX5D-000288-Pb for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2016 08:35:20 +0200 Original-Received: from localhost ([::1]:54818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAX5D-0006GN-1I for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2016 02:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAX52-0006BU-W1 for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 02:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAX4w-0002hi-Gi for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 02:35:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAX4w-0002hZ-Dx for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 02:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bAX4w-0004X4-97 for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2016 02:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jun 2016 06:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23574 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 23574-submit@debbugs.gnu.org id=B23574.146536764517302 (code B ref 23574); Wed, 08 Jun 2016 06:35:02 +0000 Original-Received: (at 23574) by debbugs.gnu.org; 8 Jun 2016 06:34:05 +0000 Original-Received: from localhost ([127.0.0.1]:59627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAX41-0004V0-J5 for submit@debbugs.gnu.org; Wed, 08 Jun 2016 02:34:05 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:54487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAX3y-0004UX-NP for 23574@debbugs.gnu.org; Wed, 08 Jun 2016 02:34:03 -0400 Original-Received: from [192.168.1.100] ([212.95.7.45]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lrviw-1bbMol1IVi-013e49; Wed, 08 Jun 2016 08:33:41 +0200 In-Reply-To: <83eg89roam.fsf@gnu.org> X-Provags-ID: V03:K0:wDZl+GVu88MScdqVgzCgpDq8k9dGnWRjCuQyEOl/ngVw5EIxx/G xn97dd3tVUGwzNvP9m03L/K+n11iGjMBuIW4vSZbl/7QNtl8/zwebxkiQ5mwgJutTj9E34N quDGJLkSl1/sP7zVerHCGCEWDSUVt6GIEutRSbkhLY7YSFK1aKSekoPguPNYue2RB1LaKUX GO/OEzAhH+Bezpu1oivuA== X-UI-Out-Filterresults: notjunk:1;V01:K0:2du28GkSw5Y=:9UY4LZ02m9Sv32sSa2/k/6 BZGXbM9FI0MyvmzPKMlmdt8yDbJc4/QysGtBllHzV1t2uixO46IJZj9Z2YWHlK9HUtapcjncT YSPq9ksedvX621xSXNWXLKppPf5FyKYtc2seyNlMwVeUWZx1lEOTNaAKrRiOwybNUszpBOxk/ uTCjzV6Fzoe2DN3Hf7OT9JuGPEXlVxOoR11/i4SWVhVWybWlWd4sdIUe2vc8CGlDY+lFOtbUo tIA2qRlw67IVPj7s8aesbroJ2yMd4xYxg+82mMXi9cCjtD0lcDTkA80i30/NI7SfNjCTOTMbO nseXyDtUha3ppn9XahM8X4Q/g7I3SGk2jFTbslGc612Z8bD44itx3JKJIRueF7/trEEjdpExh /JiRLvPY2CNWkCTqqAjRf50VXr1AuVxi8YhPUQON+7C6ppQbwx/yH1FqFv3BuDfMxPgxEGmMV 4Pzc+foHPkWwoLZtbbp1dWAGN6JGv4MYqUBh1k9D30v4Qp9ojvi3C3gAjyoIm8czackdDzDPE zW1m6p822BLJuxtDrzcDp1QhR+/E+U44p3eCjFSAcU8yj97IF/TXUkF2owiiHmO5V1X16/r8Q ykpIOq40T87bfZz+0BH60vjIhzG1GV7e+3UqQdbDOVDkUivGrwJszrPymECPGm0CYCevQUu/s p9kQBPKhTYa8HW6b7VfGY4Jm9xL07/U+2+NsArkANu2uh/z5p8jvnkSyjEiunXrMyeIoN0sKU rXMuahCQeUwuPVLPyrYOMOv6OpQtu/lr/TuBZLW9yjVMVlMYXKRkkU0xsMCEPb7oxMROwPz5 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:119260 Archived-At: > Talk about over-specification ;-) > > I hope you realize how some of that will make redisplay much more > expensive? Yes. But the only value I really care about is nil ;-) > How about the following more modest alternative? > > (defcustom face-extend-to-window-edge t > "Non-nil means extend face of last character on line to window edg= e. > > 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 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.") This has the advantage of a much better doc-string. The only details missing are whether the last character of a line is the newline character, whether a non-printable character's attributes count, how invisible characters are treated and whether the :display attribute has any impact. Since I have no good idea about all of these I deliberately did not try to cover them. I'm not sure whether your proposal (it obviously was my first idea as well) is less expensive, though. If the value of our variable is a list, the display engine has to go through the properties of the last character and compare them against the members of this list. Or go through all members of the list and compare them against the character's properties - neither of these approaches is cheap even if optimizations are applied. And then I thought about the - possibly silly idea - that a user might want to put a property like :background on all lines displayed, regardless of the last character's attributes. Such a user would have to, before displaying the relevant buffer parts, go through all these lines and add that property to the newline (?) character of each line. Now I bet that the greater part of such users would put the property on all newline characters of the buffer instead of using something like =E2=80=98pre-redisplay-functions=E2=80=99 where even I couldn't tell whet= her it gets the window's start and end positions always right. martin