From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 06 17:31:35 2018 Received: (at submit) by debbugs.gnu.org; 6 Jul 2018 21:31:35 +0000 Received: from localhost ([127.0.0.1]:48859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbYKE-0002Le-IL for submit@debbugs.gnu.org; Fri, 06 Jul 2018 17:31:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbUNl-0004aR-8u for submit@debbugs.gnu.org; Fri, 06 Jul 2018 13:18:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbUNf-0002WR-0I for submit@debbugs.gnu.org; Fri, 06 Jul 2018 13:18:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fbUNe-0002WN-TP for submit@debbugs.gnu.org; Fri, 06 Jul 2018 13:18:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbUNd-0003uE-Do for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 13:18:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbUNY-0002VX-DD for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 13:18:49 -0400 Received: from imarko.xen.prgmr.com ([71.19.158.228]:54418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbUNY-0002Ug-3M for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 13:18:44 -0400 Received: from localhost ([127.0.0.1] helo=zsu.kismala.com) by imarko.xen.prgmr.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fbUNT-0000l3-Oc for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 10:18:39 -0700 From: Istvan Marko To: bug-gnu-emacs@gnu.org Subject: 27.0.50; clear-face-cache in an X frame breaks tty colors Date: Fri, 06 Jul 2018 10:18:39 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 06 Jul 2018 17:31:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) 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. Newly created tty frames are OK. Running (clear-face-cache) in the tty frame fixes the affected frame. Non-256-color tty frames don't seem to be affected. I am running into this regularly because I often have Emacs sessions with both X and tty frames, switching back and forth between them. Sometimes when I switch back to the tty frame I find that the colors are messed up. I suspect that this is triggered by redisplay_internal periodically calling clear-face-cache. I am able to reproduce this with the current master and emacs-26 using the following steps: 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. Running (clear-face-cache) in the tty frame restores the correct tty faces. The X frame is not affected. Looking at the git log e573d08ef15f0431ad8289b4242c49826f20efb6 ("Make face realization be more frame-specific") seems like a potential suspect but unfortunately I am no longer able to build that revision on my Linux hosts (temacs loading gobbles up all available memory for some reason) In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu) of 2018-07-06 built on somehost Repository revision: 3bbd4ffc68bcc2b3e003a2179a508b82055ad770 Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 System Description: Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. user-error: Beginning of history; no preceding item Configured using: 'configure --without-x-toolkit --without-gpm --without-rsvg --without-gconf --without-xim --without-gsettings --with-file-notification=inotify --without-lcms2' Configured features: XPM JPEG TIFF GIF PNG IMAGEMAGICK SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB OLDXMENU X11 THREADS Important settings: value of $LANG: C locale-coding-system: nil Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting font-render-setting x multi-tty make-network-process emacs) Memory information: ((conses 16 95891 6947) (symbols 48 20447 1) (miscs 40 40 85) (strings 32 29147 1543) (string-bytes 1 759273) (vectors 16 15030) (vector-slots 8 508852 6900) (floats 8 52 65) (intervals 56 243 142) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 07 04:14:46 2018 Received: (at 32072) by debbugs.gnu.org; 7 Jul 2018 08:14:46 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 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 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 Date: Sat, 07 Jul 2018 11:14:39 +0300 Message-Id: <83muv3jwcw.fsf@gnu.org> From: Eli Zaretskii To: Istvan Marko In-reply-to: (message from Istvan Marko on Fri, 06 Jul 2018 10:18:39 -0700) Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32072 Cc: 32072@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 09 03:17:35 2018 Received: (at 32072) by debbugs.gnu.org; 9 Jul 2018 07:17:35 +0000 Received: from localhost ([127.0.0.1]:51666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcQQR-0001nt-Ah for submit@debbugs.gnu.org; Mon, 09 Jul 2018 03:17:35 -0400 Received: from imarko.xen.prgmr.com ([71.19.158.228]:50820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcQQP-0001nh-J6 for 32072@debbugs.gnu.org; Mon, 09 Jul 2018 03:17:34 -0400 Received: from localhost ([127.0.0.1] helo=zsu.kismala.com) by imarko.xen.prgmr.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fcQQJ-0003GX-Fu; Mon, 09 Jul 2018 00:17:27 -0700 From: Istvan Marko To: Eli Zaretskii Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors In-Reply-To: <83muv3jwcw.fsf@gnu.org> Date: Mon, 09 Jul 2018 00:17:27 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32072 Cc: 32072@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > 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? Interestingly the colors of list-colors-display remain intact (except for the modeline). list-faces-display however shows the problem. Here are some screenshots with the M-x list-faces-display buffer from an emacs-client -t frame on a 256 color terminal before and after running clear-face-cache in the X11 frame. Normal: https://i.imgur.com/QPUbARN.png Bad: https://i.imgur.com/080IjKI.png Note that some colors are retained, for example the background of tty-menu-selected-face which is "red", a color that exists on 16 color terminals too. > Or do you mean that a _second_ call to clear-face-cache fixes the TTY > frames? Yes, this. Calling clear-face-cache again, this time from the 256 color TTY frame, fixes the TTY frames. > If the latter, does it matter what frame is selected when you issue > that second call? Yes, the second call only helps if it's done while the 256 color TTY frame is the active one. > 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? M-x redraw-display in the tty frame does not help. > "Black or green"? So the effect is not entirely deterministic? I think it's deterministic but may have a couple of variations depending on the state of my Emacs session or the terminal. I haven't figured out > Do you see this in Emacs 26 as well, or only on the master branch? Yes, I see this with both 26 and master. I am fairly sure that this wasn't happening about 2 years ago. Perhaps it started when I switched from 25 to 26 but not sure. I am having trouble building an old enough version on my current Linux system to verify but if we get stuck I will find a way to build it and try to bisect. -- Istvan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 16 03:20:57 2018 Received: (at 32072) by debbugs.gnu.org; 16 Jul 2018 07:20:57 +0000 Received: from localhost ([127.0.0.1]:42250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fexoX-00010W-Gv for submit@debbugs.gnu.org; Mon, 16 Jul 2018 03:20:57 -0400 Received: from imarko.xen.prgmr.com ([71.19.158.228]:50826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fexoW-00010I-Jk for 32072@debbugs.gnu.org; Mon, 16 Jul 2018 03:20:57 -0400 Received: from localhost ([127.0.0.1] helo=zsu.kismala.com) by imarko.xen.prgmr.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fexoQ-0003zi-JR for 32072@debbugs.gnu.org; Mon, 16 Jul 2018 00:20:50 -0700 From: Istvan Marko References: Date: Mon, 16 Jul 2018 00:20:50 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32072 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I have done some more testing and found that 24-bit terminal frames are not affected, their colors remain intact after doing (clear-face-cache) in the X11 frame. I have been planning to switch to 24-bit anyway so this is a good enough for me but let me know if it's worth trying to debug the 256 color case further. -- Istvan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 21:39:55 2018 Received: (at 32072) by debbugs.gnu.org; 19 Jul 2018 01:39:55 +0000 Received: from localhost ([127.0.0.1]:47332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffxv9-0000ww-EK for submit@debbugs.gnu.org; Wed, 18 Jul 2018 21:39:55 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:37219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffxv7-0000wf-GE; Wed, 18 Jul 2018 21:39:53 -0400 Received: by mail-it0-f53.google.com with SMTP id p17-v6so7115538itc.2; Wed, 18 Jul 2018 18:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=PS6/8jtsqk+kpAetlkwj3bKxOPJy+tLgmHzTs2kF+9A=; b=RtvrXccEwji4GTamgIusbtuiumAG1Vd35eqTcvnIOJXLNJ49lXXs+72OpDs4q7dOn7 GtTXUwNSbrovD4QECeCdXMc8S2J2TOy4uXgHfd1Q13WUSjC0hEAAU7+k0KkGei1WpzUi 6ecIxbsVNygfc7TGrjHNjoYJ1hnt/ligh4R5brW8ypZND/wsPdjhiVdpzBEgSbOMbLPb w9NYaZufFei+PBZ5t0FWz/rE9fGXC2kxtnfcLw67KnuHWzOtujQr7O2YfPkz3g0UOoCR HHcxLT6RKhaN9ZhV51uV5wjXZEIROGb1512UWhmN7E2lK6BJnStcbCCP+UPe34Shkl/a kRxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=PS6/8jtsqk+kpAetlkwj3bKxOPJy+tLgmHzTs2kF+9A=; b=s3vY3HGOJ//4KaLb4s9b6i+kieDqezkntQQ+ILAN9Vf622IZlWCeBE5oCLFAfUx2sr iK56QLP/eaCLUTmLNko4N0q7uPJl92GvdnzZcdasGUXSUArxMWu9Vy3mO0Qb50fgZI14 6YIMFzWByOyyYSo4gRA0z8Sb/KMArI9pEctMLe8UgvH+VGfOvkWREBH3CVwt1zyrCDNE O0pI+eFEUHv//XhJp/Cbe4g4uqAEDQhTl11dkA/7DlwAMOMS48dfxGabG/EpblI/IaHY LozK+JlYuUWpxLmdsq1hrwbL+hROeRhkVCkJmU4L2J2M4SezNTtO1ela53qxArGdaT4R 63WA== X-Gm-Message-State: AOUpUlFrkFjURvw9rq2xc2Krx7/ZPs5/icvTGITFBNQ9eJX2o9hlztVv E9iwrIxX1YOQyGK83yIYSCFxHA== X-Google-Smtp-Source: AAOMgpdy5bT9+d7y/M+QQa9110YCCP7js30ufwvn6j6OJaMMuQ8HQ7g8FaGlN0wj/7zAcdC/7gXc2Q== X-Received: by 2002:a24:7584:: with SMTP id y126-v6mr4024867itc.11.1531964387861; Wed, 18 Jul 2018 18:39:47 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id f1-v6sm2067138iob.47.2018.07.18.18.39.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Jul 2018 18:39:46 -0700 (PDT) From: Noam Postavsky To: Istvan Marko Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors In-Reply-To: (Istvan Marko's message of "Mon, 16 Jul 2018 00:20:50 -0700") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Wed, 18 Jul 2018 21:39:45 -0400 Message-ID: <87r2k06m1q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32072 Cc: 32072@debbugs.gnu.org, Rami =?utf-8?Q?Ylim=C3=A4ki?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) found 32072 26.1 tags 32072 + confirmed quit Istvan Marko writes: > I have done some more testing and found that 24-bit terminal frames are > not affected, their colors remain intact after doing (clear-face-cache) > in the X11 frame. Hmm, interesting, I've bisected the problem to [1: e463e5762b]. [1: e463e5762b]: 2017-02-18 13:04:55 +0200 Support 24-bit direct colors on text terminals https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e463e5762bbe628be3d15da066a90f079a8468b3 > I have been planning to switch to 24-bit anyway so this is a good enough > for me but let me know if it's worth trying to debug the 256 color case > further. It would be good not to break the 256 colour case, yes. I've cc'd the author of that 24 bit support, maybe they will have some more ideas. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 09:20:24 2018 Received: (at 32072) by debbugs.gnu.org; 19 Jul 2018 13:20:24 +0000 Received: from localhost ([127.0.0.1]:47649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fg8r2-0004TH-21 for submit@debbugs.gnu.org; Thu, 19 Jul 2018 09:20:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fg8qz-0004T4-HG for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 09:20:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fg8qt-0003av-J7 for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 09:20:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fg8qm-0003XG-Pf; Thu, 19 Jul 2018 09:20:08 -0400 Received: from [176.228.60.248] (port=4665 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fg8qm-0005Sv-7M; Thu, 19 Jul 2018 09:20:08 -0400 Date: Thu, 19 Jul 2018 16:20:06 +0300 Message-Id: <83lga72whl.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87r2k06m1q.fsf@gmail.com> (message from Noam Postavsky on Wed, 18 Jul 2018 21:39:45 -0400) Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors References: <87r2k06m1q.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32072 Cc: mi-ebugs@kismala.com, 32072@debbugs.gnu.org, rami.ylimaki@vincit.fi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Date: Wed, 18 Jul 2018 21:39:45 -0400 > Cc: 32072@debbugs.gnu.org, > Rami Ylimäki > > > I have done some more testing and found that 24-bit terminal frames are > > not affected, their colors remain intact after doing (clear-face-cache) > > in the X11 frame. > > Hmm, interesting, I've bisected the problem to [1: e463e5762b]. > > [1: e463e5762b]: 2017-02-18 13:04:55 +0200 > Support 24-bit direct colors on text terminals > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e463e5762bbe628be3d15da066a90f079a8468b3 Thanks. Just stabbing in the dark here, but does the patch below help? diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index ab9149e..a776c83 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -824,10 +824,12 @@ tty-color-canonicalize (replace-regexp-in-string " +" "" (downcase color)) color))) -(defun tty-color-24bit (rgb) - "Return pixel value on 24-bit terminals. Return nil if RGB is -nil or not on 24-bit terminal." - (when (and rgb (= (display-color-cells) 16777216)) +(defun tty-color-24bit (rgb &optional display) + "Return 24-bit color pixel value for RGB value on DISPLAY. +DISPLAY can be a display name or a frame, and defaults to the +selected frame's display. +If DISPLAY is not on a 24-but TTY terminal, return nil." + (when (and rgb (= (display-color-cells display) 16777216)) (let ((r (lsh (car rgb) -8)) (g (lsh (cadr rgb) -8)) (b (lsh (nth 2 rgb) -8))) @@ -850,7 +852,7 @@ tty-color-define (error "Invalid specification for tty color \"%s\"" name)) (tty-modify-color-alist (append (list (tty-color-canonicalize name) - (or (tty-color-24bit rgb) index)) + (or (tty-color-24bit rgb frame) index)) rgb) frame)) @@ -1026,7 +1028,7 @@ tty-color-desc (or (assoc color (tty-color-alist frame)) (let ((rgb (tty-color-standard-values color))) (and rgb - (let ((pixel (tty-color-24bit rgb))) + (let ((pixel (tty-color-24bit rgb frame))) (or (and pixel (cons color (cons pixel rgb))) (tty-color-approximate rgb frame))))))))) From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 13:33:49 2018 Received: (at 32072) by debbugs.gnu.org; 19 Jul 2018 17:33:49 +0000 Received: from localhost ([127.0.0.1]:48488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgCoH-0004QD-IG for submit@debbugs.gnu.org; Thu, 19 Jul 2018 13:33:49 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:33475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgCoF-0004Px-14 for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 13:33:48 -0400 Received: by mail-oi0-f53.google.com with SMTP id l10-v6so16459136oii.0 for <32072@debbugs.gnu.org>; Thu, 19 Jul 2018 10:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vincit.fi; s=ticniv; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ioJuy3RPOQJw3KH1dh7bLXyZGGiV5S+VEqUc6kxG/7E=; b=J/97DwW7DB+YgH5TQ6qCFzd2vvGD4J3m6yF0PR+Oz3eLLAVmzBlnINb4cMWFZshl/6 +Dw/5Fv/FnXbcI1BG1XdenTiPC2rBEw3RcJtMuIOrQjwMkRDcKAXCN++y56VBA36pCGm VeGURCycHybiT8fYLTj8wagIigAA9hroY7zCU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ioJuy3RPOQJw3KH1dh7bLXyZGGiV5S+VEqUc6kxG/7E=; b=qq6XeXemelnIgDQIS6cmoq+n6suCuJDwJkIV3ttJHR+f1dc1k0JhcfF28YGFbHl8Og MUtysx9t0ov2hU6HUTM2ie0vb8qOr6hlHnLSKEBE5+s6ONSzvrTSyeRhMhDQevwC6q23 /2Ks4zUKfI2OUjQrppBRnpTiNuSJ88gpmNSs7R6thIWKOByjq+2iGxTdKxLX+KqjFSv9 9XgId41ssaqrVQ3r/g0CBVzoSqrxpe/za7foKFbZRH4qoRCKvI6pagjBPIbmMUI3C8ko NyGYYf69KeyKkE4n9hpmQb9uBmb83xvrrY3KRK1AgE37V82FQncoD6c+DOWb1J13H7BC DRwg== X-Gm-Message-State: AOUpUlGZfsOY1cAE0XlBqW+eU0IzRjZFTtWMK6TUFpNmkc3VgqjksRYl 8ziLc9GOXLVXqeoDMcI0NXfqQG/D60IsyYfJqDxpTg== X-Google-Smtp-Source: AAOMgpeso5c4L3XcG/wYR0k8A7kyKg49db5nOP4g1O2EYZbAQSI1mtoFXb3U6bccCBvlIlqwtDdyOcR5iFLm/bJyigc= X-Received: by 2002:aca:c00b:: with SMTP id q11-v6mr11123024oif.330.1532021621207; Thu, 19 Jul 2018 10:33:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:7d81:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 10:33:40 -0700 (PDT) In-Reply-To: <83lga72whl.fsf@gnu.org> References: <87r2k06m1q.fsf@gmail.com> <83lga72whl.fsf@gnu.org> From: =?UTF-8?Q?Rami_Ylim=C3=A4ki?= Date: Thu, 19 Jul 2018 20:33:40 +0300 Message-ID: Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000854eec05715d944d" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32072 Cc: mi-ebugs@kismala.com, 32072@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000854eec05715d944d Content-Type: text/plain; charset="UTF-8" 2018-07-19 16:20 GMT+03:00 Eli Zaretskii : > > > Thanks. Just stabbing in the dark here, but does the patch below > help? > > Yes. I tested the patch and can't reproduce the problem while I can reproduce it without your patch. --000000000000854eec05715d944d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2018= -07-19 16:20 GMT+03:00 Eli Zaretskii <eliz@gnu.org>:

Thanks.=C2=A0 Just stabbing in the dark here, but does the patch below
help?


Yes. I tested the patch and can't = reproduce the problem while I can reproduce it without your patch.

--000000000000854eec05715d944d-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 13:48:27 2018 Received: (at 32072) by debbugs.gnu.org; 19 Jul 2018 17:48:27 +0000 Received: from localhost ([127.0.0.1]:48493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgD2Q-0004lI-TP for submit@debbugs.gnu.org; Thu, 19 Jul 2018 13:48:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgD2O-0004l5-5r for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 13:48:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgD2F-0006LP-H7 for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 13:48:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgD2F-0006LL-D2; Thu, 19 Jul 2018 13:48:15 -0400 Received: from [176.228.60.248] (port=1688 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fgD2E-0000bV-QH; Thu, 19 Jul 2018 13:48:15 -0400 Date: Thu, 19 Jul 2018 20:48:13 +0300 Message-Id: <837elr2k2q.fsf@gnu.org> From: Eli Zaretskii To: Rami =?utf-8?Q?Ylim=C3=A4ki?= In-reply-to: (message from Rami =?utf-8?Q?Ylim=C3=A4ki?= on Thu, 19 Jul 2018 20:33:40 +0300) Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors References: <87r2k06m1q.fsf@gmail.com> <83lga72whl.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32072 Cc: mi-ebugs@kismala.com, 32072@debbugs.gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Rami Ylimäki > Date: Thu, 19 Jul 2018 20:33:40 +0300 > Cc: Noam Postavsky , mi-ebugs@kismala.com, 32072@debbugs.gnu.org > > 2018-07-19 16:20 GMT+03:00 Eli Zaretskii : > > Thanks. Just stabbing in the dark here, but does the patch below > help? > > Yes. I tested the patch and can't reproduce the problem while I can reproduce it without your patch. Thanks, pushed to emacs-26 branch. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 14:19:03 2018 Received: (at 32072) by debbugs.gnu.org; 19 Jul 2018 18:19:03 +0000 Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgDW2-0005Yx-Uo for submit@debbugs.gnu.org; Thu, 19 Jul 2018 14:19:03 -0400 Received: from imarko.xen.prgmr.com ([71.19.158.228]:50832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgDW0-0005YS-UR for 32072@debbugs.gnu.org; Thu, 19 Jul 2018 14:19:01 -0400 Received: from localhost ([127.0.0.1] helo=zsu.kismala.com) by imarko.xen.prgmr.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fgDVu-0000Si-3F; Thu, 19 Jul 2018 11:18:54 -0700 From: Istvan Marko To: Eli Zaretskii , Rami =?utf-8?Q?Ylim=C3=A4ki?= Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors In-Reply-To: <837elr2k2q.fsf@gnu.org> References: <87r2k06m1q.fsf@gmail.com> <83lga72whl.fsf@gnu.org> <837elr2k2q.fsf@gnu.org> Date: Thu, 19 Jul 2018 11:18:53 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32072 Cc: 32072@debbugs.gnu.org, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Thanks, pushed to emacs-26 branch. emacs-26 looks good here too now, thanks! The fix will be needed in master too, right? It was broken in both 26 and master. -- Istvan From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 14:24:10 2018 Received: (at 32072-done) by debbugs.gnu.org; 19 Jul 2018 18:24:10 +0000 Received: from localhost ([127.0.0.1]:48520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgDaz-0005i5-Ns for submit@debbugs.gnu.org; Thu, 19 Jul 2018 14:24:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgDay-0005hq-0l for 32072-done@debbugs.gnu.org; Thu, 19 Jul 2018 14:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgDao-0006Ia-Si for 32072-done@debbugs.gnu.org; Thu, 19 Jul 2018 14:24:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgDao-0006IR-P6; Thu, 19 Jul 2018 14:23:58 -0400 Received: from [176.228.60.248] (port=3876 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fgDao-0002Oh-6x; Thu, 19 Jul 2018 14:23:58 -0400 Date: Thu, 19 Jul 2018 21:23:57 +0300 Message-Id: <8336wf2if6.fsf@gnu.org> From: Eli Zaretskii To: Istvan Marko In-reply-to: (message from Istvan Marko on Thu, 19 Jul 2018 11:18:53 -0700) Subject: Re: bug#32072: 27.0.50; clear-face-cache in an X frame breaks tty colors References: <87r2k06m1q.fsf@gmail.com> <83lga72whl.fsf@gnu.org> <837elr2k2q.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32072-done Cc: 32072-done@debbugs.gnu.org, rami.ylimaki@vincit.fi, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Istvan Marko > Cc: npostavs@gmail.com, 32072@debbugs.gnu.org > Date: Thu, 19 Jul 2018 11:18:53 -0700 > > > Eli Zaretskii writes: > > > Thanks, pushed to emacs-26 branch. > > emacs-26 looks good here too now, thanks! Thanks, I'm therefore closing the bug. > The fix will be needed in master too, right? It was broken in both 26 > and master. The fix will be merged to master soon enough. From unknown Mon Aug 18 15:40:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Aug 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator