From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 11:43:13 2020 Received: (at submit) by debbugs.gnu.org; 21 Jun 2020 15:43:13 +0000 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 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 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 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 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) 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) To: bug-gnu-emacs@gnu.org From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Subject: 28.0.50; term.el's select-window call interacts badly with modeline Message-ID: Date: Sun, 21 Jun 2020 17:43:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit 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: -2.3 (--) 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) From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 12:02:40 2020 Received: (at 41984) by debbugs.gnu.org; 21 Jun 2020 16:02:40 +0000 Received: from localhost ([127.0.0.1]:60776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2Qa-0008B2-99 for submit@debbugs.gnu.org; Sun, 21 Jun 2020 12:02:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2QY-0008Ap-Pf for 41984@debbugs.gnu.org; Sun, 21 Jun 2020 12:02:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54170) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn2QT-00051h-Fd; Sun, 21 Jun 2020 12:02:33 -0400 Received: from [176.228.60.248] (port=2150 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jn2QS-0003yZ-Tf; Sun, 21 Jun 2020 12:02:33 -0400 Date: Sun, 21 Jun 2020 19:02:26 +0300 Message-Id: <838sggv23x.fsf@gnu.org> From: Eli Zaretskii To: Herman@debbugs.gnu.org, =?utf-8?Q?G=C3=A9za?= In-Reply-To: (Herman@debbugs.gnu.org) Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41984 Cc: 41984@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: -3.3 (---) > From: Herman@debbugs.gnu.org, Géza > Date: Sun, 21 Jun 2020 17:43:09 +0200 > > 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. Any reason why you decided this isn't a doom modeline bug? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 12:18:23 2020 Received: (at 41984) by debbugs.gnu.org; 21 Jun 2020 16:18:23 +0000 Received: from localhost ([127.0.0.1]:60820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2fn-0000Am-Ds for submit@debbugs.gnu.org; Sun, 21 Jun 2020 12:18:23 -0400 Received: from mail-ej1-f50.google.com ([209.85.218.50]:46837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2fl-0000AN-C3 for 41984@debbugs.gnu.org; Sun, 21 Jun 2020 12:18:22 -0400 Received: by mail-ej1-f50.google.com with SMTP id p20so15362290ejd.13; Sun, 21 Jun 2020 09:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=43S2GYlLXjLRxg/HT4dvvYsXLH+0SPd+ZKW4dxKsl0A=; b=nMBPpT+KYC3OlrbkIhKbN0gKiaA0bw9JDDnUHw4/EtGhRZiyONP1s2HXQA0LrEx8CY uHXz91ggNRE1Gi8/F6/citsc5bqwh4dNg4/pc8E1yOr+q6N0UO+Y+j0p3Gqs2vhyWd8l QQI9d02mBYvZHh09XRj6hKdWaejhqi2h/udNFLAOOYnhnXxyzH/5LqyrD07NTptfp6NU jaRlQft1ac/I9etzF7+s8tWWTOBXmACL6JRWnPkqer4ZJ5i/ds5sVwtZxj8cNVU+lGc+ rv6T1+xCOpw5r4csLaCSOvmm32XI0OWwQkcteKV0/OOAQw7gzAJQ/be/YXYkYBxrwfXx w/4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=43S2GYlLXjLRxg/HT4dvvYsXLH+0SPd+ZKW4dxKsl0A=; b=dU7bgYBC8xnuHtbHspnQQbyHSWjcgkm3xzS8yvJIM2b0VNQWAfb2bHwII9wSGGcL3o LeHF7Nqv1QQbKHC7KuBoM+8hKR6oBwUYCFWQSHjpFVrAepz0gYxNltnkDtWtF5wj5gXr p2V4i8KvlMYpE0phDz24fkbJS90ZimLUS0LG8EMR0pykO6y0Y/bhPmpwC3Ffyn9B240d 7ZRYAIQD2Rl+UG7EjnlQVBksQoAtAtDbAf1Oj3xGIkXrYG6ilyczQPj2x0qx7pcuapw5 sPwAl3rVM+T4eU5tp78ROxd8XYfiVoBuVihqJfMIT16P3E4q0lbK1vXXHgXx3d5Bo3Ui NXew== X-Gm-Message-State: AOAM531pDm7NGiOuy5+Y889T96gHiEunzmYuI5T0YxhfLB30oH8S4t6F 2bZ/E4+yQuYs5SnK3YfiXrU= X-Google-Smtp-Source: ABdhPJwavUd0rEq7kM+6BS27pxNn/9YZU1ozWYFFJPJjt+EjRvzVp+4wkriOScbHXiaBTVMX3DbYxg== X-Received: by 2002:a17:907:20ee:: with SMTP id rh14mr12406024ejb.395.1592756295580; Sun, 21 Jun 2020 09:18:15 -0700 (PDT) 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 bt11sm10311570edb.48.2020.06.21.09.18.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 09:18:15 -0700 (PDT) Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline To: Eli Zaretskii , Herman@debbugs.gnu.org References: <838sggv23x.fsf@gnu.org> From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Message-ID: <3e5250a8-2e92-f8e7-0de1-68d61463981e@gmail.com> Date: Sun, 21 Jun 2020 18:18:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <838sggv23x.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 41984 Cc: 41984@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 (-) I don't have a strong opinion on this. I just felt that selecting a window because an output arrived is not a right thing to do. Any hooks which are called during this temporarily set selected-window will have the wrong idea which is the actual selected window (I'm not exactly sure, why the bug happens though, I just suppose this is the reason). I've checked now, spaceline behaves exactly the same as doom modeline. But if you think that this is not a term.el bug, please tell the reasons, and I'll reopen my doom-modeline issue with these reasons. On 6/21/20 6:02 PM, Eli Zaretskii wrote: >> From: Herman@debbugs.gnu.org, Géza >> Date: Sun, 21 Jun 2020 17:43:09 +0200 >> >> 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. > Any reason why you decided this isn't a doom modeline bug? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 12:30:35 2020 Received: (at 41984) by debbugs.gnu.org; 21 Jun 2020 16:30:35 +0000 Received: from localhost ([127.0.0.1]:60842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2rb-0000XF-DB for submit@debbugs.gnu.org; Sun, 21 Jun 2020 12:30:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2rZ-0000Wz-LJ for 41984@debbugs.gnu.org; Sun, 21 Jun 2020 12:30:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54613) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn2rU-0000gW-Br; Sun, 21 Jun 2020 12:30:28 -0400 Received: from [176.228.60.248] (port=3868 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jn2rT-000274-8T; Sun, 21 Jun 2020 12:30:27 -0400 Date: Sun, 21 Jun 2020 19:30:22 +0300 Message-Id: <835zbkv0td.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Herman=2C_G=C3=A9za?= In-Reply-To: <3e5250a8-2e92-f8e7-0de1-68d61463981e@gmail.com> (message from Herman, =?utf-8?Q?G=C3=A9za?= on Sun, 21 Jun 2020 18:18:20 +0200) Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline References: <838sggv23x.fsf@gnu.org> <3e5250a8-2e92-f8e7-0de1-68d61463981e@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41984 Cc: 41984@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: -3.3 (---) > Cc: 41984@debbugs.gnu.org > From: Herman, Géza > Date: Sun, 21 Jun 2020 18:18:20 +0200 > > I don't have a strong opinion on this. I just felt that selecting a > window because an output arrived is not a right thing to do. I don't see why this would not be a right thing to do. Presumably, term.el wants to attract the user's attention to the fact that new input arrived. > Any hooks > which are called during this temporarily set selected-window will have > the wrong idea which is the actual selected window (I'm not exactly > sure, why the bug happens though, I just suppose this is the reason). > > I've checked now, spaceline behaves exactly the same as doom modeline. > But if you think that this is not a term.el bug, please tell the > reasons, and I'll reopen my doom-modeline issue with these reasons. I think the hooks that do something with the modeline need to be able to handle this situation, or, failing that, disable themselves when the selected window displays a term.el buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 14:18:35 2020 Received: (at 41984) by debbugs.gnu.org; 21 Jun 2020 18:18:35 +0000 Received: from localhost ([127.0.0.1]:60882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn4Y7-0003Ke-NR for submit@debbugs.gnu.org; Sun, 21 Jun 2020 14:18:35 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:37791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn4Y4-0003KS-CZ for 41984@debbugs.gnu.org; Sun, 21 Jun 2020 14:18:34 -0400 Received: by mail-ed1-f43.google.com with SMTP id k8so11804851edq.4 for <41984@debbugs.gnu.org>; Sun, 21 Jun 2020 11:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=NChAxT6nFcrBgx99Hbax3g7Tqp7JilXT9OOQpt+sIns=; b=cTXxHnJ/7lWtS6F1KFkZoZhm6wKbghq5zGj9gQw6oTMehmd9x1muv5hgBG84oanLh2 QCduckojAmja+93Tvm8cT5PFSzeWa8bCLSbPb9xNOBeWvpc9LBcmAKTtMD8jd4qrgMb8 CkJqPGD7UZYVlyroguqueCPqgxw5KE8EDX7oPn8GAKvv/0KWKq5c9JK8JUKQ8D4HpOHO 1aPOjfgegk+he1Hp4WVxl9+BS/Dq2RgpH0jBHfEjOqFVfWyDUf3L49giTqfSvasj2J7p iscLM8Fx8c7AQewEswL2PtYu/fp0R5nJWNjfAh/STo20e1NnE1tb3O8JNFsa73cRbdA8 FljA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=NChAxT6nFcrBgx99Hbax3g7Tqp7JilXT9OOQpt+sIns=; b=imM4hKPdjIVpTBll5kFMtjgOwVUR7q5cn1rceI+rALqbbvMcMTerzf19oN7ZkPCJZj NTz6Oo8GAnWIN8YhNnCkYF0maTxqyqzXfZ/kHK1SQWFl/6378EIZbak34cj733EwQoUE dhXBFgwiOCrT0SVLPZ2D80zspjqiNb/rBYBtq1FVpiPQFtNqR8IgC+VLZ7r64fX2TxEN MVfLofqeSeB+McvzeSETp7BST96zkSRyPPADx1QL6h9C1QF8bJO7jX89tOX3Sea/BwY+ bkLPgucfl20PMj1vjdenqtyVu5POLl3La8h05EZZaPvg5Ciix3aB1jmpemFtqK3orEe+ 39nQ== X-Gm-Message-State: AOAM532b3dUZ3o+Ycc6yV+Vsoei9kVcqO06IzBHt4SUUWRr7IhJ1D2+a AAVLrh1T/6E+JmI2xkZtdMc= X-Google-Smtp-Source: ABdhPJxktNdX4Ge7bKh68U1zyRV+NDwKqzwjfZtcYIZK14aN9BwfuHsTAbwIxOAl1Z8sfrUdrGhdgA== X-Received: by 2002:aa7:cd6c:: with SMTP id ca12mr13713643edb.36.1592763506584; Sun, 21 Jun 2020 11:18:26 -0700 (PDT) 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 s2sm10462320edu.39.2020.06.21.11.18.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 11:18:26 -0700 (PDT) Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline To: Eli Zaretskii References: <838sggv23x.fsf@gnu.org> <3e5250a8-2e92-f8e7-0de1-68d61463981e@gmail.com> <835zbkv0td.fsf@gnu.org> From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= Message-ID: <467f415a-a7ef-e27b-26c1-d70d7fd3c128@gmail.com> Date: Sun, 21 Jun 2020 20:18:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <835zbkv0td.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: sv-FI X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41984 Cc: 41984@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 (-) On 6/21/20 6:30 PM, Eli Zaretskii wrote: > I don't see why this would not be a right thing to do. Presumably, > term.el wants to attract the user's attention to the fact that new > input arrived. Okay, I don't understand emacs's internals nor elisp to judge this. As I see, it doesn't attract the user's attention. It does some scroll related stuff. Like keeping the last written line at the bottom, or so. Anyways, as adding a "t" parameter to select-window seems to fix the issue for me, I'll just add it into my term.el. Feel free to close this issue if you think that's not a term.el bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 15:03:55 2020 Received: (at 41984) by debbugs.gnu.org; 21 Jun 2020 19:03:55 +0000 Received: from localhost ([127.0.0.1]:60909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn5Fz-0004Wl-6D for submit@debbugs.gnu.org; Sun, 21 Jun 2020 15:03:55 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:46583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn5Fw-0004WX-BK for 41984@debbugs.gnu.org; Sun, 21 Jun 2020 15:03:54 -0400 Received: by mail-ed1-f43.google.com with SMTP id m21so11820760eds.13 for <41984@debbugs.gnu.org>; Sun, 21 Jun 2020 12:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Xsi4XAjjzNWi5BMCS57RjgbucPhqlPRWPJX97bJFXRg=; b=YqP+0y3RjukVYmCrqUTOdbOZdSHR15xfuDq3b1oTORMKWmNpEdM5RTLl6GlwGuVi88 jjpvUyj8as94gxuiJOfh3GIahv0KEaWyl9aILDyyFaLP1cuEtb/WzsXJOEuQwKsvlKOy ox840Z283ha+dkfLqXdBE7lYfy/L0tAAMCUpBY/0erzJVqKG/RMiSScy0VvMSrGvIrdk C6ssCtOR3O7DTQkm3bX3MM0dKa7thNgAC0HNtQsM6tPCyAVRlIalkavbkf0PQeU98eD/ bmlvbPyTZIaHrysL5LNOnsndd2wW/35zs4GAU44XsKjq9AWSzDLFUg1+YsUkcH8r513i 4I+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Xsi4XAjjzNWi5BMCS57RjgbucPhqlPRWPJX97bJFXRg=; b=IXVM74Ndvygnrh6COBCcoGDjS71XXk/5iE6R214f6C5b3EzC+gWG9aSH11BTVan5bS gQnOKZBZud1Z6Z7Gfmv6oeueRJ6SoV/bRqBTQ2WJHb18WhG5GtBE66QVSIT3htv+I86k I3ubkLjPapVSZ++U+zVgGJJSi2V/H8iM1yzWAunOlJRf4X/iCKLrhMtxB3DsKxPXOKzo kX2jT87uuj4kNrlYPAfLHNJf3cI1VXIIU6DY2/iuUHLl10gn/m0f7tr4KcvPzpGE1QBC AboNNynn5/aGDiB1HJ/YTdoiVROKT6IoMEJ/O+J8lgj9WAw3L+rQydRUC7utIDFwIJEC nhTw== X-Gm-Message-State: AOAM530pzNVL63Zex3Ac/z34LxzJkyLlcOR8rnvIWfXgCkTAwWzPHkMK yEp0ssbhBAAwe5uyIVohPJc= X-Google-Smtp-Source: ABdhPJwmFOUhjytgX1QVlCB3CRrLZY++3oLcACAowTQZWfMYFE9E7dx6SieSalkQg//sVfPy7OvfgQ== X-Received: by 2002:a05:6402:1202:: with SMTP id c2mr13311266edw.182.1592766226567; Sun, 21 Jun 2020 12:03:46 -0700 (PDT) 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 x11sm9820814ejv.81.2020.06.21.12.03.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 12:03:46 -0700 (PDT) Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline From: =?UTF-8?Q?Herman=2c_G=c3=a9za?= To: Eli Zaretskii References: <838sggv23x.fsf@gnu.org> <3e5250a8-2e92-f8e7-0de1-68d61463981e@gmail.com> <835zbkv0td.fsf@gnu.org> <467f415a-a7ef-e27b-26c1-d70d7fd3c128@gmail.com> Message-ID: <859200e3-3eaa-0d9e-f987-31bcab16ff16@gmail.com> Date: Sun, 21 Jun 2020 21:03:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <467f415a-a7ef-e27b-26c1-d70d7fd3c128@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41984 Cc: 41984@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 (-) What is suspicious to me: term-emulate-terminal uses save-selected-window. And save-selected-window uses "(select-window (car state) 'norecord)", when it restores the state. Note the 'norecord parameter. So it is very logical to me that the "(select-window win)" call in term-emulate-terminal should also have 'norecord. Also, here's the help for select-window: "Note that applications and internal routines often select a window temporarily for various purposes; mostly, to simplify coding.  As a rule, such selections should be not recorded and therefore will not pollute buffer-list-update-hook.  Selections that "really count" are those causing a visible change in the next redisplay of WINDOW's frame and should be always recorded." So this issue definitely seems a bug in term.el to me. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 17 12:39:00 2021 Received: (at 41984) by debbugs.gnu.org; 17 Sep 2021 16:39:00 +0000 Received: from localhost ([127.0.0.1]:32800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRGtA-0002Yj-9p for submit@debbugs.gnu.org; Fri, 17 Sep 2021 12:39:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRGt8-0002YV-NQ for 41984@debbugs.gnu.org; Fri, 17 Sep 2021 12:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/gWtBbY7gKGqC+r0N8M5fz0WswtDNI2qke5HLFBAseI=; b=bSVVJ1am0YJrAOPuOd1fFN1Zcb ONxT4ct8is8sxQKwYJAQzk0Dy9YD3+oCtnMeH1iOt9JKWl+UGkTnf6PfKNpELPUTJkv0iAwQyzn1e vtiwR+cmK7V4BzXMHthJCy/hUkauFbwh212KtYTRiHGdb22S7nslfFQ1zbhBw1CEw2wk=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRGsy-00020A-KR; Fri, 17 Sep 2021 18:38:52 +0200 From: Lars Ingebrigtsen To: =?utf-8?Q?G=C3=A9za?= , 41984@debbugs.gnu.org Subject: Re: bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline References: Date: Fri, 17 Sep 2021 18:38:48 +0200 In-Reply-To: (Herman's message of "Sun, 21 Jun 2020 17:43:09 +0200") Message-ID: <875yuzupgn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Herman, Géza writes: > 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). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41984 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: -3.3 (---) Herman, G=C3=A9za writes: > 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). I think that sounds like the correct fix here (since we're just doing this for internal reasons, we shouldn't record the window selection), so I've pushed this change to Emacs 28. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 17 12:39:09 2021 Received: (at control) by debbugs.gnu.org; 17 Sep 2021 16:39:09 +0000 Received: from localhost ([127.0.0.1]:32804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRGtE-0002ZN-HV for submit@debbugs.gnu.org; Fri, 17 Sep 2021 12:39:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRGtD-0002Yb-CM for control@debbugs.gnu.org; Fri, 17 Sep 2021 12:39:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GEij5Ty37bsiXpw+Oy3Y7n5hr57IVLQRf23aF9jEEkg=; b=QE/pZnsg4UMRPF2kC6g8f5Gu6z nu3hW+uoVYZuDbD4qKTmdoTvdVFS+Ce29jUCPzOgnWBLW/0IUMrpFjhfbm67SpjxxGgWsq0XcDzZL dZaW4NVUjjBykBNfwkKwPyLDdpNoLrlTC9wojXX9n/RupVElx9/a/ilZI4MblWSlJ7fk=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRGt4-00020I-HD for control@debbugs.gnu.org; Fri, 17 Sep 2021 18:38:56 +0200 Date: Fri, 17 Sep 2021 18:38:54 +0200 Message-Id: <874kajupgh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #41984 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 41984 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) close 41984 28.1 quit From unknown Fri Aug 15 21:25:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 Oct 2021 11:24:08 +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