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 17:42:22 +0200 Message-ID: <83y3jf21wh.fsf@gnu.org> References: <83r2pf78x5.fsf@gnu.org> <83fu5v6kdi.fsf@gnu.org> <83371u6xc2.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1519659670 4645 195.159.176.226 (26 Feb 2018 15:41:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2018 15:41:10 +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 16:41:05 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 1eqKtl-0000hq-NI for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Feb 2018 16:41:05 +0100 Original-Received: from localhost ([::1]:59807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqKvo-0002Wb-4F for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Feb 2018 10:43:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqKvh-0002W6-8E for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 10:43:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqKve-0004X7-KI for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 10:43:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eqKve-0004X1-El for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 10:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eqKve-0003kB-3X for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2018 10:43:02 -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 15:43:02 +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.151965975114354 (code B ref 30553); Mon, 26 Feb 2018 15:43:02 +0000 Original-Received: (at 30553) by debbugs.gnu.org; 26 Feb 2018 15:42:31 +0000 Original-Received: from localhost ([127.0.0.1]:33649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqKv9-0003jS-CF for submit@debbugs.gnu.org; Mon, 26 Feb 2018 10:42:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqKv7-0003jE-7l for 30553@debbugs.gnu.org; Mon, 26 Feb 2018 10:42:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqKuy-0004Dg-Rg for 30553@debbugs.gnu.org; Mon, 26 Feb 2018 10:42:24 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqKuy-0004DZ-Ne; Mon, 26 Feb 2018 10:42:20 -0500 Original-Received: from [176.228.60.248] (port=4454 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eqKuy-000775-4d; Mon, 26 Feb 2018 10:42:20 -0500 In-reply-to: (message from Aaron Jensen on Sun, 25 Feb 2018 14:09:46 -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:143667 Archived-At: > From: Aaron Jensen > Date: Sun, 25 Feb 2018 14:09:46 -0800 > Cc: Alp Aker , 30553@debbugs.gnu.org > > I changed my mind on this after discovering that these variables do > not work as buffer local variables. Whatever the current buffer has it > set to causes all other visible buffers to draw in that way, which > causes underlines to jump around if they're set differently in > different buffers. > > Please see attached patch. I don't have a windows or linux machine to > test on, so if someone could do that it would be appreciated. There > are some subtle differences in the original code which I tried to > respect. I'm not sure I see the point of adding yet another variable. Don't you see the same problem with local values of that variable, like you saw with the 2 existing ones? 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. If we want to allow users to make these variables buffer-local, the best way is to modify the display code to use their buffer-local values. That would be a cleaner solution, I think. But anyway, what is the use case where you need different values for these variables in different buffers? These variables were introduced to solve problems with semi-buggy fonts, and these problems are not limited to a single buffer. Also, if you set these variables to ignore the line-spacing, it will produce a reasonable display in a buffer without any line-spacing at all, so I wonder why you needed to make these local. Can you explain?