From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#74087: Bug patch: invoke tab-bar-tab-post-open-functions during tabs initialization Date: Tue, 29 Oct 2024 16:04:37 -0400 Message-ID: References: <86a5em4w18.fsf@mail.linkov.net> <861pzy3fot.fsf@mail.linkov.net> <86ttcu20e5.fsf@mail.linkov.net> <86froe3d66.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ef67060625a3183d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16643"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74087@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 29 21:05:17 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 1t5sSr-00048t-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Oct 2024 21:05:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5sSe-0008Sc-BK; Tue, 29 Oct 2024 16:05:04 -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 1t5sSc-0008Qg-92 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 16:05:02 -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 1t5sSb-0008Eq-Vm for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 16:05:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=QdO2qOivI6UbFOPpq4J1q0zdQFdWyPdu1I8RDgq4PQ0=; b=SA2JDKlAqdlumkfgK+MT4/xngCreValeaTBGZpGoygmTdFmPk8ha8e/pizRGpFjPm6d8GFsYfM3e1oma/Q5HypjB99+Oroj9vePHFo8UPPZMOcpYwf4AIY7vLOiSEZI29snCkSXmbWQqJCcn6S4xKbXjGmhyT2XGW+YX9R5luVI7vbXp+nFEsu7lLkFFzK1kbxS/Su3G6TfqBDGNbWEGXb6aGb0ht4YoUmkLnVtO/Ils5YAUDk7UPKMFVByA596gzEsrJGOIG31vuUyASpp9WeeskNtziQ4Nms1GhW/UwSKJbBLdrsZB/4ios2CcRbS7yArJOqHO4HE6rkgCZm5xbg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5sSb-0000Fk-QD for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 16:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 20:05:01 +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.1730232296958 (code B ref -1); Tue, 29 Oct 2024 20:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 20:04:56 +0000 Original-Received: from localhost ([127.0.0.1]:58488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5sSV-0000FO-IT for submit@debbugs.gnu.org; Tue, 29 Oct 2024 16:04:56 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5sST-0000FI-At for submit@debbugs.gnu.org; Tue, 29 Oct 2024 16:04:54 -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 1t5sSR-0008Pd-NS for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 16:04:51 -0400 Original-Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5sSQ-0008Dl-4H for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 16:04:51 -0400 Original-Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3e5fb8a4e53so3121416b6e.1 for ; Tue, 29 Oct 2024 13:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730232288; x=1730837088; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QdO2qOivI6UbFOPpq4J1q0zdQFdWyPdu1I8RDgq4PQ0=; b=DDlpxF5AU4RkPqtn0gmvp31DfCo77NpLigxibAJw3YkDliXplF4xVPyZlS6VRgvQgA rKI1c4BpYlI1uLaf5lfUZobNcHenUYLBLCWnFRVnYNc1uFwRq95vb+EPZN9fq6XNeZ2p 3GdwUc8Jr9ERSuZtGgMBcRyrq5tBu+tqHxxO32ROwBd9GdovVx32Unn+MIxjErhxyZZy UidYcXhTWx1VjjOnVTKw4/RASxgXrTf4gToO3r7361E6732bV7MJrtX7bTKhSQDCFsXN FZ3b6soNr6Luyx4nVNIHab0Kzj9U5ittyYY2hr5LEmxK/vbaBqS4WTyAHIM76XGDBO4l v0BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730232288; x=1730837088; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QdO2qOivI6UbFOPpq4J1q0zdQFdWyPdu1I8RDgq4PQ0=; b=r2d5HllxZokmfAYKhLuJ/K4Kswpat/nGtidn1cDeifjXuh11FlK8nIvKo1Re+ONuR8 6H18pHLXAHHai/Y1jxERQTn+TXFTaV25EWgGzu2SDb/307KroIzJNv04fdp7CAz2hw48 qab1EyQadWQugrC0LrVQlCA4V9wvzCxG94Z+fmfwKX8eFUhsz0lF9G57YUn7TUfpucbj nmuDxT5l6MEdLcmz1mLeK+lHWVGIWOgfGa5kMWpSnYuTiu76wXsgv5IYs9uQZfgf2Jfh H9ieq7jGXbzv/2LNU0+QOLvnXEdI/MN4nNr7ooI/b1In9BmOHxbbbzW08FxP/oH+RJyI U9Sg== X-Gm-Message-State: AOJu0YwZaNjKu4WcxCyhb6CFMbBbShEvzLDcdh4GOrFVxphE8TM/eCIN zyFfdK2u1Srfc5qdeBMtoCx7qhkhWzO6VYNTWX0dlMm3H5P8gG//tv1L5krUO1FywtHhL782m7h hIhat1s4kQJ+6TgYAtr847Zmw3DADeQ== X-Google-Smtp-Source: AGHT+IGUOLyuw7K94/FBY9exWciSBMy5TKCbUlCjMbXMvwkk50RWWAzkPcp8kBQawpr+XRTC8ERDMEj/iqckAqj5EuM= X-Received: by 2002:a05:6808:159f:b0:3da:bc80:b233 with SMTP id 5614622812f47-3e638248f79mr13073203b6e.17.1730232288500; Tue, 29 Oct 2024 13:04:48 -0700 (PDT) In-Reply-To: <86froe3d66.fsf@mail.linkov.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=shipmints@gmail.com; helo=mail-oi1-x233.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, HTML_MESSAGE=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-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:294533 Archived-At: --000000000000ef67060625a3183d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable But the patch works and tabs have been set and the initial tab has been assigned and passed to the hook. Works fine. I'm missing your concern. On Tue, Oct 29, 2024 at 3:49=E2=80=AFPM Juri Linkov wrote= : > > 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 o= n > > that separately from the proposed patch and see if I can simplify pinni= ng > > as a result (which is already a pain in the neck and quite imperfect). > > > > On Tue, Oct 29, 2024 at 3:23=E2=80=AFPM 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=E2=80=AFPM 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 a= ny > > 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 alread= y > exists. > > What could be done in 'tab-bar-tabs' is to call a completely new hook nam= ed > 'tab-bar-init'. > --000000000000ef67060625a3183d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
But the patch works and tabs have been set and the initial tab has been = assigned and passed to the hook. Works fine. I'm missing your concern.<= /div>

On Tue, Oct 29, 2024 at 3:49=E2=80=AFPM Juri Linkov <juri@linkov.net> wrote:
> 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 pinn= ing
> as a result (which is already a pain in the neck and quite imperfect).=
>
> On Tue, Oct 29, 2024 at 3:23=E2=80=AFPM Ship Mints <shipmints@gmail.com> wrote= :
>
>=C2=A0 =C2=A0 =C2=A0In a pre-open hook, I'd expect to be able to de= ny a new tab being
>=C2=A0 =C2=A0 =C2=A0opened, for example, if I want a tab-bar with a fix= ed set of tabs. That
>=C2=A0 =C2=A0 =C2=A0seems like a different use-case from operating on a= tab after it's
>=C2=A0 =C2=A0 =C2=A0officially created even if not yet visible.
>
>=C2=A0 =C2=A0 =C2=A0On Tue, Oct 29, 2024 at 3:18=E2=80=AFPM Ship Mints = <shipmints@gmai= l.com> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0That's not a good assumption, tho= ugh. The motivation behind putting
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the open hook call after the tabs are= set on the frame is to allow
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0users to use the frame tabs as they w= ould for tabs created at any
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0other time with no special casing. I = don't think we need a special
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case, just treat all tabs the same, f= irst 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'.=C2=A0 The initial= tab already exists.

What could be done in 'tab-bar-tabs' is to call a completely new ho= ok named
'tab-bar-init'.
--000000000000ef67060625a3183d--