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#33871: 27.0.50; Revert Dired window saved in window configuration Date: Sat, 23 Mar 2024 20:31:57 +0200 Organization: LINKOV.NET Message-ID: <86plvksv1e.fsf@mail.linkov.net> References: <87bm59mglk.fsf@mail.linkov.net> <86fsoezsw3.fsf@mail.linkov.net> <86sfsewvxr.fsf@mail.linkov.net> <9d741b43-e3bb-669b-b345-6b877c902b33@gmx.at> <86fsoaq4lo.fsf@mail.linkov.net> <86tucp7dbp.fsf@mail.linkov.net> <37e2129c-464f-7f0a-0870-f7360ca21dc3@gmx.at> <86zfw07tbw.fsf@mail.linkov.net> <96fd3170-e5d2-4d16-93ec-c6fff3efb787@gmx.at> <86wmr2w7to.fsf@mail.linkov.net> <3808f9f8-624a-449c-8572-085582395859@gmx.at> <86y1bffvya.fsf@mail.linkov.net> <8634skstio.fsf@mail.linkov.net> <86msqr79n8.fsf@mail.linkov.net> <532c59dc-59af-4454-b926-2f80fe711fe9@gmx.at> <86zfuq5jxj.fsf@mail.linkov.net> <5cf2b85e-9e24-4a7d-b175-ce140580df32@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29330"; 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: 33871@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 23 19:41:37 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 1ro6JF-0007UG-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Mar 2024 19:41:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ro6Iz-00044e-MD; Sat, 23 Mar 2024 14:41:21 -0400 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 1ro6Iy-00044J-Ue for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 14:41:20 -0400 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 1ro6Iy-00022Z-MU for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 14:41:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ro6Jd-00060n-Vs for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 14:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Mar 2024 18:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33871 X-GNU-PR-Package: emacs Original-Received: via spool by 33871-submit@debbugs.gnu.org id=B33871.171121927422996 (code B ref 33871); Sat, 23 Mar 2024 18:42:01 +0000 Original-Received: (at 33871) by debbugs.gnu.org; 23 Mar 2024 18:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:46493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro6Io-0005yd-Db for submit@debbugs.gnu.org; Sat, 23 Mar 2024 14:41:14 -0400 Original-Received: from mslow1.mail.gandi.net ([217.70.178.240]:37059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro6Im-0005yN-0Z for 33871@debbugs.gnu.org; Sat, 23 Mar 2024 14:41:09 -0400 Original-Received: from relay7-d.mail.gandi.net (unknown [217.70.183.200]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 79C50C2C41 for <33871@debbugs.gnu.org>; Sat, 23 Mar 2024 18:34:58 +0000 (UTC) Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 81A9F20002; Sat, 23 Mar 2024 18:34:37 +0000 (UTC) In-Reply-To: <5cf2b85e-9e24-4a7d-b175-ce140580df32@gmx.at> (martin rudalics's message of "Sat, 23 Mar 2024 10:14:25 +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:281997 Archived-At: >> Ok, let's add new code to separate functions >> 'window-set-context' and 'window-use-context'. >> Below is the patch with these new functions. >> Maybe they could be moved from tab-bar.el to window.el? > > I think you should do that. OTOH, tab-bar.el is preloaded as well, so no problem to leave this in tab-bar.el, since window.el is too large already. > Maybe 'window-restore-set-context' and 'window-restore-use-context' > would be more indicative names. The name 'window-restore-set-context' looks quite self-contradictory. If your intention was to use a unique prefix, then maybe we could use the prefix 'window-context' like in 'window-context-set', 'window-context-use'. > Note that when a buffer is killed, the values of its local variables may > be lost. I don't know whether this is an issue here. Alternatively, we > could have 'set_window_buffer' set the 'context' window parameter from > the buffer-local value which would, however, mean that whenever one > changes the buffer-local value, one would have to simultaneously update > the parameters in all windows showing that buffer. Something that could > be done with the help of an advice, though... This doesn't look like an issue here because the context is stored in a window parameter. And when the buffer is killed, there is no need to restore a context in the killed buffer. The format of the window parameter '(BUFFER-NAME . ((dired-filename . FILENAME))) uses BUFFER-NAME to check whether the buffer was killed, and when the current window's buffer doesn't match BUFFER-NAME, then do nothing.