From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#22466: 25.0.50; disable-theme apparently forces a redisplay and causes a screen flash Date: Tue, 26 Jan 2016 17:25:36 +0000 Message-ID: <87io2gns3b.fsf@gmail.com> References: <87y4bcsogq.fsf@gmail.com> <83powo1j71.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453838186 25194 80.91.229.3 (26 Jan 2016 19:56:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 19:56:26 +0000 (UTC) Cc: 22466@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 26 20:56:13 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 1aO9ik-0003i1-6c for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jan 2016 20:56:10 +0100 Original-Received: from localhost ([::1]:46438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9ij-0006bO-QA for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jan 2016 14:56:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9if-0006Yc-Ic for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2016 14:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO9ic-00046t-9U for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2016 14:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO9ic-00046l-63 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2016 14:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aO9ic-0007ZX-10 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2016 14:56:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87y4bcsogq.fsf@gmail.com> Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2016 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22466 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22466-submit@debbugs.gnu.org id=B22466.145383814529073 (code B ref 22466); Tue, 26 Jan 2016 19:56:01 +0000 Original-Received: (at 22466) by debbugs.gnu.org; 26 Jan 2016 19:55:45 +0000 Original-Received: from localhost ([127.0.0.1]:37933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO9iK-0007Yr-PL for submit@debbugs.gnu.org; Tue, 26 Jan 2016 14:55:44 -0500 Original-Received: from mail-qg0-f52.google.com ([209.85.192.52]:36709) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aO9iJ-0007Ye-Oh for 22466@debbugs.gnu.org; Tue, 26 Jan 2016 14:55:44 -0500 Original-Received: by mail-qg0-f52.google.com with SMTP id e32so149169257qgf.3 for <22466@debbugs.gnu.org>; Tue, 26 Jan 2016 11:55:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:references:message-id:mime-version :content-type; bh=0gKk7pHqt3LV2fHaDwi/iRIu2O39avqVNMwLGGxzYco=; b=ZJNQS4z5dvCws5gzvQsVk4SHDOh8NhshK8g/oEiuPTu6pHJ3Q8N2adMRVsRbffDl9K HuGWSjXuC13woV6swCQcIxO4rpSrn3nEuvPfxtpLers7eSnCd1TUAN6TCVb3rFHtAaxc iHHM65priTq4YjXWaC3Py0Nsz+aSBnd664xWfbBRbjK5Sv5WpSo2mrIF0dt/BaeSiOYu 1QN1wP9UdIbjfgEK02RqlmtT/jab9ZvLz2tQTmWSQpRIozauaqI5R5RdhpX5Bu0ZBmWU 4a/IVQVOLfHYcDpNKUjKctFpegh9b4hkW2BH7lO3uzfD62QUQev+OcC4pkCV5D7TzAJH OACw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:references :message-id:mime-version:content-type; bh=0gKk7pHqt3LV2fHaDwi/iRIu2O39avqVNMwLGGxzYco=; b=UQ/4kJ+U89bH1BYeV9yuAz/9p6ONsdpiyHC0UP0i4NMaHRQo0rOquJ/QTkvPd/gUW9 uJ3qs8Ocg99g/T/nUusx3Zrp1uTYWwL/F+KsMZCmpYYl1cRhZnyuGlp4NZ+AVDhXNQgK yGQ+KuVrWOOMDrk/27f0RuRm8LL1UygEIg0Xb16iAJqPhE7tBTKeNJKA0GrHJJs770wf RWxozDoFraiGmvfWhfO8/NH0JCbL8tJjzZwYfVxB5hP523pCr/ShJhMsZAnsWgQeNkjG u/sNhePwKkGWv0xj9qF6CdSFCRGUqHwLl0K6uTJgjn67IDDzZDTBcD4w0OAsc5FD+lVU t+jA== X-Gm-Message-State: AG10YOQI185jxrj3So4NkTcuzxvQvypABXiYHesfRP6cXLdzfh+vXW6+Lw5keNm3+CAAtA== X-Received: by 10.140.42.139 with SMTP id c11mr30768626qga.5.1453838138143; Tue, 26 Jan 2016 11:55:38 -0800 (PST) Original-Received: from Gandalf-Linux.gmail.com ([201.37.162.188]) by smtp.gmail.com with ESMTPSA id h99sm1145544qge.7.2016.01.26.11.55.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jan 2016 11:55:37 -0800 (PST) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112013 Archived-At: Eli Zaretskii writes: > It's not redisplay that does this. It's the fact that disable-theme > changes the frame's background color, and when that happens, we > immediately clear the frame using the new background color, as part of > the modify-frame-parameters call. > > Redisplay only handles the portions of display where there's text and > other decorations that we manage. Clearing the frame with the new > background color is not redisplay's job. Thanks, that's good to know. >> (set-frame-parameter frame 'background-color >> (custom--frame-color-default >> frame :background "background" "Background" >> "unspecified-bg" "white")) >> >> I'm not saying this form is wrong. I'm just pointing to where it happens. > > What happens if you remove that from disable-theme? Then there's no flashing, but then if I simply disable the theme (without enabling a new one) I'm left with theme's background. > (I don't really understand why it has to specify "white".) I guess it's meant to reset the face to the default. Although, I don't see why this is explicitly necessary for the default background/foreground colors, but isn't necessary for other faces. > Anyway, how come you get to doing this so often it hurts your eyes? > Aren't people setting their beloved theme once when the session > starts, and then never change it? I never change my main color theme, but I always have a second theme enabled that only affects the mode-line. This second theme is changed occasionally and it always causes a flash (even though the theme has nothing to do with the background). Besides, custom themes are not just for faces. This also came up because someone is writing a package that simultaneously toggles between different values for a set of variables (called a context) using custom-themes. That's something that's designed to be used a couple times a day. Anyway, it's not a huge defficiency and it's not worth any large efforts. I brought it up because I thought there was an eager redisplay happening somewhere and that might point to a deeper bug, but you've clearly explained that's not the case. :-)