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#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors Date: Sat, 07 Jul 2018 11:14:39 +0300 Message-ID: <83muv3jwcw.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530951189 1275 195.159.176.226 (7 Jul 2018 08:13:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2018 08:13:09 +0000 (UTC) Cc: 32072@debbugs.gnu.org To: Istvan Marko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 10:13: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 1fbiL2-0000CB-90 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2018 10:13:04 +0200 Original-Received: from localhost ([::1]:60989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbiN9-0006zp-8h for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2018 04:15:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbiMz-0006zi-Pf for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2018 04:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbiMw-0004jS-Je for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2018 04:15:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fbiMw-0004jI-Ef for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2018 04:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fbiMw-0002lG-5P for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2018 04:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jul 2018 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32072 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32072-submit@debbugs.gnu.org id=B32072.153095128610570 (code B ref 32072); Sat, 07 Jul 2018 08:15:02 +0000 Original-Received: (at 32072) by debbugs.gnu.org; 7 Jul 2018 08:14:46 +0000 Original-Received: from localhost ([127.0.0.1]:49057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbiMf-0002kQ-US for submit@debbugs.gnu.org; Sat, 07 Jul 2018 04:14:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbiMe-0002kA-Gt for 32072@debbugs.gnu.org; Sat, 07 Jul 2018 04:14:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbiMW-00049P-6z for 32072@debbugs.gnu.org; Sat, 07 Jul 2018 04:14:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbiMW-000493-3C; Sat, 07 Jul 2018 04:14:36 -0400 Original-Received: from [176.228.60.248] (port=4623 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fbiMV-0005M6-DD; Sat, 07 Jul 2018 04:14:35 -0400 In-reply-to: (message from Istvan Marko on Fri, 06 Jul 2018 10:18:39 -0700) 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:148284 Archived-At: > From: Istvan Marko > Date: Fri, 06 Jul 2018 10:18:39 -0700 > > When an Emacs session has both an X11 frame and a tty frame on a 256 > color capable terminal calling (clear-face-cache) in the X11 frame > results in the colors getting messed up in the existing tty frame. Can you tell more about what "messed-up" means? E.g., what do you see if you type "M-x list-colors-display RET" in a TTY frame after invoking clear-face-cache on a GUI frame? > Newly created tty frames are OK. Running (clear-face-cache) in the > tty frame fixes the affected frame. Strange: clear-face-cache does not work only on the selected frame, it clears the face caches of _all_ the GUI frames, and is supposed to do nothing for TTY frames, except forcing recreation of all faces on the next redisplay. So I'm not sure I understand what does "Running (clear-face-cache) in the tty frame" mean. Are you saying that if all frames in a session are TTY frames, the problem doesn't happen? Or do you mean that a _second_ call to clear-face-cache fixes the TTY frames? If the latter, does it matter what frame is selected when you issue that second call? What if you invoke clear-face-cache, and then type "M-x redraw-display RET" in a TTY frame -- does that still show "messed-up" colors? > Start Emacs in X11 mode and start Emacs server: > > emacs -Q > M-x server-start > > Then in a 256 color terminal with TERM=xterm-256color or similar: > > emacsclient -t > > Then switch back to the X frame and evaluate: > > M-: (clear-face-cache) RET > > This immediately corrupts the colors of the tty frame. Not sure if all > faces are affected but the mode-line face for example always turns black > or green for me so it's very obvious. "Black or green"? So the effect is not entirely deterministic? Do you see this in Emacs 26 as well, or only on the master branch? Thanks.