From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline Date: Sun, 21 Jun 2020 17:43:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="18006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 To: 41984@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 21 17:44:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jn28r-0004Zv-Mp for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jun 2020 17:44:21 +0200 Original-Received: from localhost ([::1]:53418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn28o-0004qA-RQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jun 2020 11:44:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jn28Z-0004ps-06 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 11:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jn28Y-0002Kc-Mo for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jn28Y-0007dA-K3 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jun 2020 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41984 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159275419329240 (code B ref -1); Sun, 21 Jun 2020 15:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jun 2020 15:43:13 +0000 Original-Received: from localhost ([127.0.0.1]:60744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn27k-0007bY-VU for submit@debbugs.gnu.org; Sun, 21 Jun 2020 11:43:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn27h-0007bO-Hi for submit@debbugs.gnu.org; Sun, 21 Jun 2020 11:43:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jn27h-0004kW-AC for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 11:43:09 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:37616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jn27f-0002GY-KW for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 11:43:09 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id a6so12276238wrm.4 for ; Sun, 21 Jun 2020 08:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=cx2kyhrnyBi6qmuHw2Fzv/iFKBVnMxDWL3l+JMAynCA=; b=WzEXJ6loPDyfl7h4WZUG5qveVSuKigHPwBKcermhfoMDfbqb8/eKyGLaZhOk8ufCK4 dNccjrK9nDMMW/Dv9QdRMwwbB5Io1YEMQV8nDDPqK6mVfRxk/FKDQe0GnNnU3rTFm2Lh vs6Q0S96kGl8rFYNTVfvAEL6K01jSBhZp+lusKynGFdPaI4P20vtn08SBJILLsWn+ow1 AZDH48V8EZZlCG7g5Zd26G9etA5WdQ0puET8RdDGzNY1fxsZoHsmJBf5kK0NwWl4iqXr ymThdAO9RGmuwiYCWQCnPbbUKwibXBg2wJSAaOdPFDCBDmDDtY8zx0z+rjNEMC5CQYoU YfIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=cx2kyhrnyBi6qmuHw2Fzv/iFKBVnMxDWL3l+JMAynCA=; b=BL31jAn/9N1MtOsDLg6fJXhRm9BBdC3Z4U89Anab3KY/kme1ymcqeIeXtpQSJ8TjOS t+xa8T2dMPGGQh+2tXa+w98WIIMAu56I2PD4JkLQF3l9rvnLIyiciZYzyPe8ndsAU5Hr S6KeRmu1A++Ad4EjaY7rAhhNrzx3BwKkIrQoRb2rfpUrqB/GHT7jiRDi7wzY601YPJ7H /LhY7QzgddrKKlrmdLH5CH3B3P4S/NJFhEXMMvxdc85s1iWyH4JEfiBmzqLp0A0P6ptW CyhYdArhBzkAHzjsMGza27sVzIkjAt6wBd7F5HQ4BkOj9UC74K84wTtxXd0Uu8Zh3ckq e5nw== X-Gm-Message-State: AOAM532HHw6aaCuhZHouCq+9bUFsY6hxbblqT+/pTUTWqBshsmDrlk2+ cEqLRYQsMn+9YQnpRK7ufP8= X-Google-Smtp-Source: ABdhPJxG0INgQENunCzVVSeM812XpyAtL2cb/8mkIE43q+4/HjfeqV4oNLHO9fhigWH2cr/7vd0fWQ== X-Received: by 2002:a05:6000:10c4:: with SMTP id b4mr2351510wrx.50.1592754185328; Sun, 21 Jun 2020 08:43:05 -0700 (PDT) Original-Received: from [192.168.8.4] (netacc-gpn-7-220-203.pool.telenor.hu. [176.77.220.203]) by smtp.gmail.com with ESMTPSA id u4sm14406628wmb.48.2020.06.21.08.43.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 08:43:04 -0700 (PDT) Content-Language: sv-FI Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=geza.herman@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182241 Archived-At: I noticed that the call "(select-window win)" in term.el (in term-emulate-terminal) interacts badly with doom modeline. This select-window call confuses the modeline which is the active window, and it causes the terminal's modeline displayed as active, as soon as the terminal receives output, no matter which is the actual active window. And the real active window is displayed with an inactive modeline. I found if I modify this "(select-window win)" line to "(select-window win t)", the bug doesn't happen anymore (I'm not sure whether it's a correct fix in all regards or not). Here's my full description of the issue, with screenshot: https://github.com/seagle0128/doom-modeline/issues/355 Describe: When one window has an ansi-term, which constantly outputs some text, and another window has the focus, then doom-modeline behaves strange: the mode line of the focused window loses activity, and part of ansi-term's mode line becomes active. Use this init.el: --------------------------------------------- (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) (package-initialize) (unless (package-installed-p 'use-package)   (package-refresh-contents)   (package-install 'use-package) ) (setq use-package-always-ensure t) (eval-when-compile (require 'use-package)) (use-package doom-modeline   :hook (after-init . doom-modeline-mode) ) --------------------------------------------- Here are the repro steps: * start emacs * split windows with split-window-vertically * execute ansi-term in one window, and enter this command into the shell: while true ; do echo Ize ; sleep 2 ; done * move the cursor to the other window * notice that the other window's modeline get activity (colored as so, as it supposed to be), but as soon as the terminal window has output, it loses it (colored as inactive). And the terminal window will have a weird colored modeline (half of it is active, the other half is inactive)