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#74087: Bug patch: invoke tab-bar-tab-post-open-functions during tabs initialization Date: Tue, 29 Oct 2024 21:46:25 +0200 Organization: LINKOV.NET Message-ID: <86froe3d66.fsf@mail.linkov.net> References: <86a5em4w18.fsf@mail.linkov.net> <861pzy3fot.fsf@mail.linkov.net> <86ttcu20e5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7737"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 74087@debbugs.gnu.org To: Ship Mints Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 29 20:52:32 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 1t5sGW-0001oV-EY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Oct 2024 20:52:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5sG7-00062b-0e; Tue, 29 Oct 2024 15:52:07 -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 1t5sG4-00062S-EQ for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 15:52:05 -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 1t5sG2-00073J-OW for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 15:52:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=2ZXRU49ZwtQkiNswgXv2T3x6GUgNtfr2FSmte4JVZPg=; b=oUDEoBQdh7swpRBTx92aX0PNI89vRVimHRKkKzCdVkZiJaEBfNgyJt0HfY2edeuhZtEoGBhS/kYVZjx1LC0nEtoUAfV7MrXG2jASCSq6xVPX5PIwK4yrlpn49vH6e0q+WZ7Jc8ecb6QTPmG6785eOGqcJI3PyDYN/m3xPDqj/nfTB7mdbV8yaTkwPgf5GoHiFqRrKD09Se78A5Zrby70PkWl/Szg5MPTqmvtG6QlvsZRoFx3WC9+8QjOlutmRrofJNNoA9CjIc088coExofJEHEB13ZtofBr4uwr/WXB6vlDoaI+hK51TTkR/Ys23geUpFZH/WOjZBhCSkAj4bGVZQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5sG2-0008JS-IB for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 15:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 19:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74087 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173023148431931 (code B ref -1); Tue, 29 Oct 2024 19:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 19:51:24 +0000 Original-Received: from localhost ([127.0.0.1]:58413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5sFQ-0008Ix-1T for submit@debbugs.gnu.org; Tue, 29 Oct 2024 15:51:24 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5sFO-0008Iq-3s for submit@debbugs.gnu.org; Tue, 29 Oct 2024 15:51:22 -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 1t5sDF-0005ZU-11 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 15:49:09 -0400 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5sDC-0006e0-Js for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 15:49:08 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 1C69CFF804; Tue, 29 Oct 2024 19:48:58 +0000 (UTC) In-Reply-To: (Ship Mints's message of "Tue, 29 Oct 2024 15:32:49 -0400") X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:294531 Archived-At: > A pre-open tab hook, though, might be useful for pinning cases if it would > allow influencing the tab position as a function value. I could think on > that separately from the proposed patch and see if I can simplify pinning > as a result (which is already a pain in the neck and quite imperfect). > > On Tue, Oct 29, 2024 at 3:23 PM Ship Mints wrote: > > In a pre-open hook, I'd expect to be able to deny a new tab being > opened, for example, if I want a tab-bar with a fixed set of tabs. That > seems like a different use-case from operating on a tab after it's > officially created even if not yet visible. > > On Tue, Oct 29, 2024 at 3:18 PM Ship Mints wrote: > > That's not a good assumption, though. The motivation behind putting > the open hook call after the tabs are set on the frame is to allow > users to use the frame tabs as they would for tabs created at any > other time with no special casing. I don't think we need a special > case, just treat all tabs the same, first or beyond. The hook 'tab-bar-tab-post-open-functions' can't be called from 'tab-bar-tabs' because no new tab is opened from 'tab-bar-tabs'. The initial tab already exists. What could be done in 'tab-bar-tabs' is to call a completely new hook named 'tab-bar-init'.