From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window Date: Mon, 15 Jan 2024 11:24:06 +0100 Message-ID: <0634c46f-db93-4492-be69-5ac6ca0102a8@gmx.at> References: <83frzdy6if.fsf@gnu.org> <86edexnmv8.fsf@mail.linkov.net> <83mstlvvkj.fsf@gnu.org> <34a872a9-07b2-4671-837f-f8d98b37420d@gmx.at> <867ckmxto2.fsf@mail.linkov.net> <92085305-caad-4bb6-ac55-a81415404a26@gmx.at> <86v885je23.fsf@mail.linkov.net> <868r4ymn7x.fsf@mail.linkov.net> <86h6jlqh2i.fsf@mail.linkov.net> <5e438b04-6fb7-4114-a5a8-61db9809b297@gmx.at> <86cyu7m4kc.fsf@mail.linkov.net> <2f80855c-3bf9-4973-a484-059cdef3b8c7@gmx.at> <669371d8-7c65-4c5f-99a9-0d8298808d23@gmx.at> <86cyu5cc0p.fsf@mail.linkov.net> <868r4reoh3.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32823"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: daniel.c.mccarthy@gmail.com, Eli Zaretskii , 68235@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 15 11:25:09 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 1rPK9U-0008H5-MO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Jan 2024 11:25:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPK9Q-0005K8-V1; Mon, 15 Jan 2024 05:25:04 -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 1rPK9O-0005Jp-Rx for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:25:02 -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 1rPK9O-0000JG-Fg for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPK9O-0004mC-4x for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jan 2024 10:25:02 +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.170531425618295 (code B ref 68235); Mon, 15 Jan 2024 10:25:02 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 15 Jan 2024 10:24:16 +0000 Original-Received: from localhost ([127.0.0.1]:44775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPK8d-0004l1-Mh for submit@debbugs.gnu.org; Mon, 15 Jan 2024 05:24:16 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:51809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPK8b-0004kn-ND for 68235@debbugs.gnu.org; Mon, 15 Jan 2024 05:24:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1705314247; x=1705919047; i=rudalics@gmx.at; bh=GWDc1Fri8kvaThdUJmc+BevO2qi/JsRTp2WSCA87qGU=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=LYWZiKnXMYii2ponukVHjSgT1DUKXuYf3QHSJaguwqRMMt5OCW7eTWbbv4K9anSL bUzzKlJxt+gBKx6IHKsxBN8435b5DTKkdNQQ30eR5GLcsu/HbRKMQLrcMnPqfSePn alVyT1GEbtnxdvVhfzWRl+rIjEVn2pXfDQi6hoUGam95nDgC+SvOmdk6gOKe8ANDB eJ7Jd4CrtmY+Y345Qt/PHk2mxOcrJLK9dxzfCgCqIkXLad3SzbzdlUijPC4JB8Fc1 jdG8v7AB8XNcG6vwDApz6YKoramScsHWz4hdVkVXzpHoVstTjTv5ijWlaMpNyRGKF lv7v4DvXAj3hlP8gNQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.8]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9o21-1rSMPS0EBp-005tXd; Mon, 15 Jan 2024 11:24:07 +0100 Content-Language: en-US In-Reply-To: <868r4reoh3.fsf@mail.linkov.net> X-Provags-ID: V03:K1:qpjOGgyqrTbwG07vRrsr+YtUBTdE4Rcql4Dxbkfs5sFUVwkhl/p OT/SgoUEEArZZX7ucAhC6bBwuhJ3QejQ+KBM0hMeR68JXE7+9oqHrT6DFDDbOj/8J1fS21d Ur1d9wnkFrpYAbOWEdc06IqR6fBLf3g8kzliOs1yor3xFMRWFKRJZ5GyoCvnP2ZYxoQSPk8 mcyeqllvdnT7A8dRJO0QA== UI-OutboundReport: notjunk:1;M01:P0:jxC1BhI5p/4=;UM1LvCJvLePUQyaLcLEZ+Sv8Ep3 gUJbfAdoxqu+7ox2GrfO0geb6GWEgkVbXwgSx0IHyZxUxwT0yWAurV03yiYLbM2cAcqTjxPUH trZehJBDFr5zsj0ftu0WtwMYMej4bmpPgALjsN2UEOpKx7u+fmDDpGQfWfQ9yeIhcVhZCBGZT lNfogO5BvzcsKko/mPr+9lJkfW53geYFnJwjPKLvg/XbalJgcA1d05VMT41gGdQA6opgcF7n+ Wey2aM2A2xlSiUa+aGozC7V7Kkw0NJAeavj2KXFhdLrV+W98RvsftTpSPWJIYInl/MEE56tqv oaoo977ksC2ciVfCxCTPSuGos0oBTm2ixPO2j/cj8PHL0HVF8xW7RmsTRMhhV34BAbPB9Cnc8 WIphU+CTqqqDb2prVyxt27GpMZ6KLjRyqR3RFlDOJjFS9bghZ6Qrxj4bx7A/va9UxBshTOWbC nTXddqYAm/IE3qG18SMequDEHTMC11zmDO+B03a3Vk6JTH8XP5Mf01HmGH74hM1mYByXytQXH Z++O0hDu65s/mH25suW5zlHwjGhOWDQvTBJ6MPzmaOHrRWzo24F8CeM027tvp6xwZm8qY6RdK FyT3F5exttepV9wXw/iwovNFZ4F6c4f/UufGXsYYhs3aFke5DqbpuDkyliJlMkqtBaidHfLI0 6Ojha3coavYRRqYiO9xuUCFb3Eh8qSlpgftHEW35V72pUB1yBXgItK6uQFcKDvPDJ9z/WgBu0 +TE8cU39jdhb9N3Zt5Jsi685bsqvPTGepkbk2k/0SbreWleUNfT9f8nsJOuTTfwlpJmOAg/+ 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:278264 Archived-At: >> IIUC we have to move some point to some position somewhere in >> 'set-window-configuration'. Who would trigger that? Calling a function >> from within 'set-window-configuration' seems hairy to me. > > I see no other way than calling this hook from 'set-window-configuration'. Agreed. But I meant to use one or two hooks 'set-window-configuration' would call. > The problem is that running the hook afterwards would be too late. > What I mean here is the annoying problem that when a buffer is killed, > then on restoring a window configuration its window is deleted. If there is only one window left, we have to show another buffer in it. > This case could be fixed here with the same change as well. > When a window parameter will contain a lambda called from > 'set-window-configuration', this lambda could do something useful > to preserve the window whose buffer was killed. Something like > displaying a placeholder with a button to restore the buffer. We'd have to handle that here /* Scan dead buffer windows. */ for (; CONSP (dead_buffer_windows); dead_buffer_windows = XCDR (dead_buffer_windows)) { window = XCAR (dead_buffer_windows); if (WINDOW_LIVE_P (window) && !EQ (window, FRAME_ROOT_WINDOW (f))) delete_deletable_window (window); } which will be a bit hairy to be on the safe side. This could not be solved with a 'post-set-window-configuration-hook' because at that time the window would have been deleted already. > The same window parameter could be used in a window with > a reverted dired buffer to move point to a previous file name. Finding the right place to do that within 'set-window-configuration' might be non-trivial. Here using 'post-set-window-configuration-hook' would be probably better. martin