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#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text Date: Mon, 26 Feb 2018 21:25:45 +0200 Message-ID: <83inaj1rk6.fsf@gnu.org> References: <83r2pf78x5.fsf@gnu.org> <83fu5v6kdi.fsf@gnu.org> <83371u6xc2.fsf@gnu.org> <83y3jf21wh.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1519673049 9084 195.159.176.226 (26 Feb 2018 19:24:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2018 19:24:09 +0000 (UTC) Cc: alptekin.aker@gmail.com, 30553@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 26 20:24:04 2018 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 1eqONX-0001vI-S1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Feb 2018 20:24:04 +0100 Original-Received: from localhost ([::1]:32916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqOPZ-0007m7-Ug for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Feb 2018 14:26:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqOPT-0007lq-7U for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 14:26:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqOPS-0004tA-2X for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 14:26:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eqOPR-0004sy-VU for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 14:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eqOPR-0002V6-Ps for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 14:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2018 19:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30553-submit@debbugs.gnu.org id=B30553.15196731529596 (code B ref 30553); Mon, 26 Feb 2018 19:26:01 +0000 Original-Received: (at 30553) by debbugs.gnu.org; 26 Feb 2018 19:25:52 +0000 Original-Received: from localhost ([127.0.0.1]:33912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqOPI-0002Ui-7o for submit@debbugs.gnu.org; Mon, 26 Feb 2018 14:25:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqOPH-0002UV-Di for 30553@debbugs.gnu.org; Mon, 26 Feb 2018 14:25:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqOP9-0004kW-6F for 30553@debbugs.gnu.org; Mon, 26 Feb 2018 14:25:46 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqOP9-0004kQ-2A; Mon, 26 Feb 2018 14:25:43 -0500 Original-Received: from [176.228.60.248] (port=1534 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eqOP8-0002II-Fj; Mon, 26 Feb 2018 14:25:42 -0500 In-reply-to: (message from Aaron Jensen on Mon, 26 Feb 2018 08:01:03 -0800) 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:143675 Archived-At: > From: Aaron Jensen > Date: Mon, 26 Feb 2018 08:01:03 -0800 > Cc: Alp Aker , 30553@debbugs.gnu.org > > > In general, you cannot assume in display code that buffer-local > > variables have their expected values, because redisplay needs to > > redraw windows other than the selected one, and when it does so, the > > window's buffer is not made the current one in the full sense of the > > word. What you saw is the display engine using the value from the > > last buffer that was current before a redisplay cycle. So you need to > > explicitly access buffer-local values by calling buffer_local_value; > > see the examples of that in xdisp.c. > > Ok, that makes sense. Would you like me to make that change for all of > them given my description below? "All" meaning the two involved in the underline position, right? Yes, that would be a good addition, I think. > Is there some performance penalty to this? Not really, no. If the variable is buffer-local, it will incur a small penalty, but we already have a couple of such variables elsewhere in the display, so I doubt one more will make any tangible difference. And for the usual case of a global symbol, there's no penalty beyond a function call. > I briefly described this above, but here are some more details. Today, > globally, I'm using: > > (setq x-underline-at-descent-line t) > > This was the default in spacemacs and it's likely because of #30609 > (underlines drawn over descenders make text hard to read) and > different colored underlines are used heavily with flycheck. So it's spacemacs' fault, perhaps exasperated by choosing some font and/or colors that make this issue more prominent. Right? Then how about asking the spacemacs developers to improve the situation on their end? > (setq-local line-spacing 1) > (setq-local x-underline-at-descent-line nil) > (setq-local x-use-underline-position-properties t) > > For reasons that led me to create this initial bug report: > x-underline-at-descent-line looks terrible when line-spacing > 0. > > With this variable, you are right, I no longer need to use > `setq-local`, I can just set this variable globally and it will look > reasonable for code and prose. Good, that's what I thought. > That said, I'm not sure exactly what you meant by: "if you set these > variables to ignore the line-spacing", are you referring to the new > variable I introduced or are you OK with me making a change to > x-underline-at-descent-line to ignore line spacing? I meant to suggest what you did: customize x-underline-at-descent-line such that it avoids the effect of line-spacing you didn't like. I assumed that such a setting will solve your problems everywhere. Nonetheless, making it possible to customize those locally for one buffer would be a good improvement, IMO. Thanks.