Juri Linkov <juri@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 71779) by debbugs.gnu.org; 27 Jun 2024 17:02:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 27 13:02:26 2024 Received: from localhost ([127.0.0.1]:43267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sMsVt-0004Iv-NX for submit <at> debbugs.gnu.org; Thu, 27 Jun 2024 13:02:25 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:38483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1sMsVr-0004Ic-Gl; Thu, 27 Jun 2024 13:02:24 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id C818E1C0007; Thu, 27 Jun 2024 17:02:11 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: =?iso-8859-1?Q?K=E9vin?= Le Gouguec <kevin.legouguec@HIDDEN> Subject: Re: bug#71779: 30.0.60; tab-bar-select-restore-windows: docstring vs default value In-Reply-To: <87msn819vp.fsf@HIDDEN> (=?iso-8859-1?Q?=22K=E9vin?= Le Gouguec"'s message of "Wed, 26 Jun 2024 08:44:10 +0200") Organization: LINKOV.NET References: <87msn819vp.fsf@HIDDEN> Date: Thu, 27 Jun 2024 19:59:20 +0300 Message-ID: <867ceacoep.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71779 Cc: 71779 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 71779 30.0.60 thanks > I am not 100% sure I succeeded in capturing the state of things, so feel > free to dismiss the patch; my main goal was to make it easier for Past > Me to get an answer to the question: "How do I get the previous > behaviour back"? Thanks, I adapted your suggestion for the docstring. > (Rationale FWIW: IME killing buffers is deliberate, so the placeholder > buffer feels redundant, i.e. it brings no information; if I am > displeased with whatever random buffer was picked to show in that > window, I can just switch to another buffer or delete the window) Actually, it's not about displeasing, it's about confusion. For example, a user has a tab with the name "NEWS", switches to another tab and kills the buffer, then quits Emacs, and the next day opens the tab "NEWS", and it displays a random buffer, e.g. "TODO". So the user asks: "Why?" With this option the answer in the same window.
bug-gnu-emacs@HIDDEN
:bug#71779
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 26 Jun 2024 06:44:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 26 02:44:25 2024 Received: from localhost ([127.0.0.1]:37996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sMMOH-0003Ot-Ax for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 02:44:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:39492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kevin.legouguec@HIDDEN>) id 1sMMOF-0003Oj-7n for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 02:44:24 -0400 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 <kevin.legouguec@HIDDEN>) id 1sMMOC-0000HD-E2 for bug-gnu-emacs@HIDDEN; Wed, 26 Jun 2024 02:44:20 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>) id 1sMMOA-0002f7-NQ for bug-gnu-emacs@HIDDEN; Wed, 26 Jun 2024 02:44:20 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52cdfb69724so4294694e87.1 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Jun 2024 23:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719384256; x=1719989056; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=U5VBzXC7q1o8COP8xT5LSLPJfozhN01RGY13SZfg7JA=; b=D7ev9XUFdTEcgJOqnGm7z+Tep/730E8lnbhIQkZnFWVJkQz5R1npslCbWy13GPsUFl u68ZM/J2gyPCJ4OkmKQgzZoKI4v+q875AatOVQKKnfnQ+bIZ/R5QgsB+oJLj8DYs3OSt fF/WQ5j9/tvxvrloy+nXo/LaRkfF5jM6ARqAtAs2fu5vs8uHsZPA/zf0yKHn2h5TDLlz PPCYp8bxpNjPm+aaYeOwzuxIF0pxNAqiKHaMcXAckAcctiu47LcrsPH3d74mhmkNSxP7 vzlKgecL27yLJZaBU+SaJ13mrAOHGOznNsil4zPx5ZLY1htX2q0NoIan/lIK9JH+KR14 JsGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719384256; x=1719989056; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U5VBzXC7q1o8COP8xT5LSLPJfozhN01RGY13SZfg7JA=; b=Jr6CpEVlIizJXLlAK+umsd3r5QGW2BVeBxvXae0PBT3ZdOhR5q9wpQkVCYqfTncInT NZ4lgnOfvpiuTWz8xlQ3nWSn38p1RbmbSaRXJ+bui95UAdAHD1zeH1dzw4/F3Gbnv86V Xsl6yIVjtH03RdehafgqLw2+ymA0HvS+lY7SqWANToFnfK9yQtrn8+rDQA/aCn+SAAtA 5J3owPkBG+nok1tmB4lNLKWEhqH2XA9Rf272cEs5aeBcWkOrliMYbU98amn50yhHnOwI R1h+CMFbfJpRYGVQT0NVzugvZ++q3h/q9QSxEzHqatl+lQaZI4UXxb1qTMiT5VNds/ht JaSw== X-Gm-Message-State: AOJu0Yy0kmx+vJPyVKK58QeGGbG1MJYpSeXf/owRp23kSquqJMfXGUEI JbxrT2l0kqoeZfh9s4ogbVIhVUATeMf8QTbzFH+hE7RVWuNe6B6qYtCioA== X-Google-Smtp-Source: AGHT+IHZcPFCEbNijQjlX1T2tQNy/6IN2Lc7Gex90MImN7eh6nkX5QxxbFkQPxb3sUr3ebxRrNJsEQ== X-Received: by 2002:ac2:485b:0:b0:52c:c1aa:dd52 with SMTP id 2adb3069b0e04-52ce183b739mr5506867e87.30.1719384251858; Tue, 25 Jun 2024 23:44:11 -0700 (PDT) Received: from hirondell (80-15-30-180.ftth.fr.orangecustomers.net. [80.15.30.180]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c84248afsm12972335e9.31.2024.06.25.23.44.11 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 23:44:11 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.0.60; tab-bar-select-restore-windows: docstring vs default value X-Debbugs-Cc: Juri Linkov <juri@HIDDEN> Date: Wed, 26 Jun 2024 08:44:10 +0200 Message-ID: <87msn819vp.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=kevin.legouguec@HIDDEN; helo=mail-lf1-x130.google.com 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Heya! Intrigued by tab-bar-select-restore-windows's docstring: > Function called when selecting a tab to handle windows whose buffer was k= illed. > When a tab-bar tab displays a window whose buffer was killed since > this tab was last selected, this function determines what to do with > that window. By default, either a random buffer is displayed instead of ^^^^^^^^^^ > the killed buffer, or the window gets deleted. However, with the help > of =E2=80=98window-restore-killed-buffer-windows=E2=80=99 it=E2=80=99s po= ssible to handle such > situations better by displaying an information about the killed buffer. Over here, 'emacs -Q' suggests that _by default_, this option is set to the eponymous symbol 'tab-bar-select-restore-windows'. So the default behaviour that I observe, when coming back to a tab that used to show a killed buffer, is a special-mode buffer named " *Old buffer foo*" saying "This window displayed the buffer =E2=80=98foo=E2=80=99." Based on the NEWS entry, I guess the effective default behaviour is the one intended? In which case, I'm attaching a suggested rewording of the docstring, based on understanding gleaned from cross-referencing the NEWS entry, the docstrings for set-window-configuration, window-restore-killed-buffer-windows, the corresponding manual entries, and the source for set-window-configuration. I am not 100% sure I succeeded in capturing the state of things, so feel free to dismiss the patch; my main goal was to make it easier for Past Me to get an answer to the question: "How do I get the previous behaviour back"? (Rationale FWIW: IME killing buffers is deliberate, so the placeholder buffer feels redundant, i.e. it brings no information; if I am displeased with whatever random buffer was picked to show in that window, I can just switch to another buffer or delete the window) --=-=-= Content-Type: text/x-diff Content-Disposition: inline diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 3401b796cac..58d2ef650a1 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1456,10 +1456,18 @@ tab-bar-select-restore-windows "Function called when selecting a tab to handle windows whose buffer was killed. When a tab-bar tab displays a window whose buffer was killed since this tab was last selected, this function determines what to do with -that window. By default, either a random buffer is displayed instead of -the killed buffer, or the window gets deleted. However, with the help -of `window-restore-killed-buffer-windows' it's possible to handle such -situations better by displaying an information about the killed buffer." +that window. By default, a placeholder buffer is displayed in that +window to give the user information about the killed buffer; this +option can also be set to: + + * nil: no special handling; `set-window-configuration' will + decide what to do with the window, e.g. make it display + another buffer; + + * a function: display another buffer in that window, and pass that + buffer to the function. See + `window-restore-killed-buffer-windows' for the calling + convention." :type '(choice (const :tag "No special handling" nil) (const :tag "Show placeholder buffers" tab-bar-select-restore-windows) --=-=-=--
Kévin Le Gouguec <kevin.legouguec@HIDDEN>
:juri@HIDDEN, bug-gnu-emacs@HIDDEN
.
Full text available.juri@HIDDEN, bug-gnu-emacs@HIDDEN
:bug#71779
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.