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: Thu, 25 Jan 2024 10:39:51 +0100 Message-ID: References: <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> <0634c46f-db93-4492-be69-5ac6ca0102a8@gmx.at> <865xzuvdgu.fsf@mail.linkov.net> <86a5p5qv61.fsf@mail.linkov.net> <86edeg2ige.fsf@mail.linkov.net> <21dcf921-acc4-4f94-b383-8ad6d0a57c59@gmx.at> <86v87qpow0.fsf@mail.linkov.net> <4bc98faf-5ebe-4c22-8c9f-04755785fde5@gmx.at> <86jzo16dcy.fsf@mail.linkov.net> <82ad12e6-babf-4be1-bab1-b7c8bb25e2a4@gmx.at> <864jf35fpz.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------MSi6U58epIRXnosKkTEfUY24" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5640"; 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 Thu Jan 25 10:41:29 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 1rSwEi-0001LY-80 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jan 2024 10:41:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSwEE-0002sa-HL; Thu, 25 Jan 2024 04:40:58 -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 1rSwED-0002sQ-Ae for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 04:40:57 -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 1rSwED-0004Cg-2A for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 04:40:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSwEI-0007qs-4l for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 04:41: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: Thu, 25 Jan 2024 09:41: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.170617560930101 (code B ref 68235); Thu, 25 Jan 2024 09:41:02 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 25 Jan 2024 09:40:09 +0000 Original-Received: from localhost ([127.0.0.1]:47359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSwDR-0007pQ-67 for submit@debbugs.gnu.org; Thu, 25 Jan 2024 04:40:09 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:36115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSwDO-0007ol-3u for 68235@debbugs.gnu.org; Thu, 25 Jan 2024 04:40:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1706175592; x=1706780392; i=rudalics@gmx.at; bh=fsSnLq0E00P0P8hkkn1+w08M/lB3kSFDoQ6wzBdRIoM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=Uo8eR6jbLQrBZuazeDj0nXvhOSEKUVX7xuzUUAfQ0M4PJYud5BwtHuVKEkrYR9lq LaWvZknqJFTEratuZBb9KJZi1EiX1mzVXHPA3YDyP+Qi+yliP2iulWMPXojZj7TRA OxSTyJg8aIiTRDNS9nc3GNfoCJB6o1Ee5/4mPV/AE9A2q8LkvWGd+tjkyT8kHxvNd j3zuJrthT2se8tf97q6KoHkrh3cnnIa9BolyrYsDF01HjYh8P1rJyGRFin5i+/W4y aVaTGdjsVlsrGnqfao0lOSMVXPuOepoetBb0zGdVjXCrIxinukySg9gtUCiecQEx+ rkt/4SoNao8iTn+iVw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.167]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M2wGs-1rWDzw3KFo-003Qxx; Thu, 25 Jan 2024 10:39:52 +0100 Content-Language: en-US In-Reply-To: <864jf35fpz.fsf@mail.linkov.net> X-Provags-ID: V03:K1:vP6HwDC/mff6B4mzpzSEz1g3srBHRpa09qdDL+UbBJ5ererl+FQ OC4V40F8wMvRZWutEJ15K9CoPYL1aznwJWtGd4eCT2obMrHR6IPmSdlt+sWHCAiJYKmmkIC 4L4wHQDXzxRKkTi1EFjI8xWfwzMa5XhuGXkNPWNiqMWX852byVXFE54pYoQtXbFMI7096xE 17ddRMgz8PX89hj7KVw+g== UI-OutboundReport: notjunk:1;M01:P0:Zg8zruGm938=;5stnPNj1NOUhSYftcMJGO1tXBjQ aLcV4x+If3PVJTj1eXiX8irmGgJl7MBcusFNrZDCtMGThh6d+I8OwEIFvZYGWbB7ZxSuV0IGp GRf0dJKTn1NUfw5D2MzlbBoXV/zeV+vsSNpDfhdydR324zZEhK5CL4f6E8C9N58u5Bxdf6/a7 r1zCXZ/xJLcXcZpD74zoUnN+B5/koENyoeY6p8mhtNKUwKrd/CZjdWChMSy6LFdf5r6g/BBa8 dvx0oxo9Rm343cWfkhHYnp/l0h24m9WfqWjRt81gsvLDXQI/AP/aB9l9aEb96jIAj7ZmVAVFd 2eJek0dqymK2gWczq3dJUT48jIWxCGEO5yWegBMyGKXR6L1Cpp3yQP09ivQ97jHpvVKayk+eX U8op09ZnT2ZmPCyKqNiiCr8xz7Drw9k/cAcL81uwyACwfe2Mp6O/4Ar4sWeo34z5vinkX9u1d YcxqjosGjcIQR9kS2816WdlQ54AGmVQQmjtxSO5iNKDXYPJhbJ9f9ooYHaIRuu9i0aNfTiL+4 CaZBfeAyiuG7qURfie13oB+hA961YwTLisTE9tMg5Sou0cRgwMykohF/VOEhzp+/8aPH13zmV Hqhbt9HXR89zn6gRgZC0TWa0JpObgCQZbQ5G5LaLBWlJtBGYYJJuzFdpeHaeLDGIP/ljiPNp1 9s6ugGERt3iDzfbIBVM3SA96L6XB4oIqm44zPifR8oFPG9SWrqtQoI41zPYdsR63BMeXUziHm b0uh+mgw1VPD23k8gZsddUU4L/McnT87SI5Iyl6GILTouZ1exTujQABIUXfP2G5JkEuUckKA 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:278843 Archived-At: This is a multi-part message in MIME format. --------------MSi6U58epIRXnosKkTEfUY24 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > When I instrumented the function 'foo', it entered edebug > between 'y-or-n-p' in > > (y-or-n-p "Configuration saved ...") > (delete-other-windows window) > (kill-buffer buffer) > (y-or-n-p "Configuration reset ...") > > So I supposed that maybe from 'delete-other-windows' and 'kill-buffer', > but now I understand this is because exiting the minibuffer from > 'y-or-n-p' calls 'set-window-configuration'. Unless 'read-minibuffer-restore-windows' is nil. Saving and restoring the configuration with 'y-or-n-p' makes no sense because in practice the user cannot change the configuration while 'y-or-n-p' is in progress. >> We could add a new field to the buffer structure and a function >> say 'buffer-last-name' which would return the last name a buffer had >> before it was renamed: nil for a new buffer, the old name before the >> last 'rename-buffer' and the last buffer name for a dead buffer. > > Looks nice. I attach a patch. >> And always think about what to propose when a new buffer with the same >> name has been created meanwhile. > > Something using uniquify could help. Maybe. Here I had problems with uniquify not always restoring the base name of a buffer when I killed the last other buffer with the same base name. Maybe the fault is all mine. >> 'kill-buffer' calls reset_buffer_local_variables which scans the local >> variables alist of the buffer and resets all values to their default >> values. Giving the variable either a 'permanent-local' property or >> binding the default value to the buffer local value around 'kill-buffer' >> could work around that but I'd rather try to save this (and other buffer >> local values) in a separate alist for buffers stored in a configuration. > > To save revert-buffer-functions like saving positions of dired files > in window parameters? For example, yes. martin --------------MSi6U58epIRXnosKkTEfUY24 Content-Type: text/x-patch; charset=UTF-8; name="buffer-last-name.diff" Content-Disposition: attachment; filename="buffer-last-name.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9idWZmZXIuYyBiL3NyYy9idWZmZXIuYwppbmRleCAzNTJhY2E4 ZGRmZC4uZjc5YjFlMDYxMTkgMTAwNjQ0Ci0tLSBhL3NyYy9idWZmZXIuYwor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