From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window Date: Thu, 04 Jan 2024 19:07:39 +0200 Organization: LINKOV.NET Message-ID: <86edexnmv8.fsf@mail.linkov.net> References: <83frzdy6if.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6171"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Dan McCarthy , Eli Zaretskii , 68235@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 04 18:14:28 2024 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 1rLRIZ-0001Qa-BM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jan 2024 18:14:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLRIA-0002BB-7u; Thu, 04 Jan 2024 12:14:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLRI8-0002AD-Dt for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLRI7-0004ga-EN for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLRIB-0000G1-5D for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jan 2024 17:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68235 X-GNU-PR-Package: emacs Original-Received: via spool by 68235-submit@debbugs.gnu.org id=B68235.1704388393897 (code B ref 68235); Thu, 04 Jan 2024 17:14:03 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 4 Jan 2024 17:13:13 +0000 Original-Received: from localhost ([127.0.0.1]:55582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLRHN-0000EP-4b for submit@debbugs.gnu.org; Thu, 04 Jan 2024 12:13:13 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLRHJ-0000Dw-K9 for 68235@debbugs.gnu.org; Thu, 04 Jan 2024 12:13:12 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 8933F1C0003; Thu, 4 Jan 2024 17:12:58 +0000 (UTC) In-Reply-To: (martin rudalics via's message of "Thu, 4 Jan 2024 11:23:45 +0100") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277321 Archived-At: >> Martin, is saving and restoring window configuration supposed to >> preserve the output following in *compilation* windows? > > It's supposed to preserve markers other than in the selected window. So > it will depend on whether the *compilation* window gets selected. But > note that 'current-window-configuration' uses > 'window-point-insertion-type' for the point marker which by default > stays behind inserted text (IIRC). Everything works nicely, and point follows the output, when this code is removed from 'tab-bar-select-tab': ;; set-window-configuration does not restore the value of ;; point in the current buffer, so restore it separately. (when (and (markerp wc-point) (marker-buffer wc-point) ;; FIXME: After dired-revert, marker relocates to 1. ;; window-configuration restores point to global point ;; in this dired buffer, not to its window point, ;; but this is slightly better than 1. ;; Maybe better to save dired-filename in each window? (not (eq 1 (marker-position wc-point)))) (goto-char wc-point)) The problem is that I still can't figure out in what cases point should be restored manually. For example, when a buffer was reverted in another window configuration, then better to restore point manually to override an invalidated marker?