X-Loop: help-debbugs@HIDDEN Subject: bug#71779: 30.0.60; tab-bar-select-restore-windows: docstring vs default value Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: juri@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Wed, 26 Jun 2024 06:45:02 +0000 Resent-Message-ID: <handler.71779.B.171938426513080 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 71779 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 71779 <at> debbugs.gnu.org Cc: Juri Linkov <juri@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: Juri Linkov <juri@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.171938426513080 (code B ref -1); Wed, 26 Jun 2024 06:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jun 2024 06:44:25 +0000 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> 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-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) --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN> Subject: bug#71779: Acknowledgement (30.0.60; tab-bar-select-restore-windows: docstring vs default value) Message-ID: <handler.71779.B.171938426513080.ack <at> debbugs.gnu.org> References: <87msn819vp.fsf@HIDDEN> X-Gnu-PR-Message: ack 71779 X-Gnu-PR-Package: emacs Reply-To: 71779 <at> debbugs.gnu.org Date: Wed, 26 Jun 2024 06:45:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Juri Linkov <juri@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 71779 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 71779: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71779 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#71779: 30.0.60; tab-bar-select-restore-windows: docstring vs default value Resent-From: Juri Linkov <juri@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 27 Jun 2024 17:03:02 +0000 Resent-Message-ID: <handler.71779.B71779.171950774616554 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 71779 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN> Cc: 71779 <at> debbugs.gnu.org Received: via spool by 71779-submit <at> debbugs.gnu.org id=B71779.171950774616554 (code B ref 71779); Thu, 27 Jun 2024 17:03:02 +0000 Received: (at 71779) by debbugs.gnu.org; 27 Jun 2024 17:02:26 +0000 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> In-Reply-To: <87msn819vp.fsf@HIDDEN> ("=?UTF-8?Q?K=C3=A9vin?= 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-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.
Received: (at control) 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]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sMsVu-0004Iy-0q for submit <at> debbugs.gnu.org; Thu, 27 Jun 2024 13:02:26 -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: control 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.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.