From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ingo Lohmar Newsgroups: gmane.emacs.devel Subject: Re: [BUG] Tab commands selecting by name Date: Sun, 13 Oct 2019 22:38:43 +0200 Message-ID: <87ftjwbcto.fsf@kenko.localhost.com> References: <87zhi8sbk2.fsf@kenko.localhost.com> <87wod962m8.fsf@mail.linkov.net> <87a7a59p0b.fsf@kenko.localhost.com> <87mue4hgi2.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265213"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 22:39:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJkds-0016o3-42 for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 22:39:04 +0200 Original-Received: from localhost ([::1]:42232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJkdl-0008W7-E2 for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 16:38:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41754) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJkdd-0008W0-Vu for emacs-devel@gnu.org; Sun, 13 Oct 2019 16:38:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJkdb-0002z6-Oz for emacs-devel@gnu.org; Sun, 13 Oct 2019 16:38:49 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:56983) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJkdb-0002w2-8H for emacs-devel@gnu.org; Sun, 13 Oct 2019 16:38:47 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E47AE2400E5 for ; Sun, 13 Oct 2019 22:38:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1570999124; bh=qoBatITxqo4hKoPM/ctPONNqqO3l19Z6x1Rqg/xCTwA=; h=From:To:Cc:Subject:Date:From; b=ZdBHPO2lHBjVJ+5gfvbL7zb+HsrENe+gJQyfbsAnO18V1dyg2MSSaY2xnnJ4RXHfg NrVtRSeoQPcWG2pWpcTROwEYnXtQFe3tCPBxCzqq+CYV4niUwRtLvwiNJzhwHJ4R7s +odng92uZTUOhsa1QyaCqrrIW3vRUTvfi5ZcJDaQ36Q5M8eOq+CqovqDJPPXpMeQdG 0zvkwMZyy2zK7qz36YL0V77vvOIGP/ZfD2l/VFC/mb2LQ1owQp6UoWrkex90zzu1kY QVByhE2+QZ4cZrufb91fQc/Exlz6zmCzvubldeQlZg5p5Y+vBeUSJ5pirIYjyNNlbU F5UDorBdSwLSw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46rtnb3b2vz9rxH; Sun, 13 Oct 2019 22:38:43 +0200 (CEST) In-Reply-To: <87mue4hgi2.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240984 Archived-At: On Sun, Oct 13 2019 23:12 (+0300), Juri Linkov wrote: >> I forgot to mention a crucial ingredient, because it's so natural for >> me: I have NOT turned on tab-bar-mode --- I do not want to see tabs, >> just to use persistent window configs. In that case, I think, the >> keymap you are talking about is not in play. So I am just using the >> commands themselves, via actual keys. >> >> But I don't really understand why the current-tab update is best placed >> in that helper function, anyway, presumably to save some updating? > > I tried to avoid using window-configuration-change-hook > and indeed the current implementation uses no hooks at all. > > But it seems now we still need to use window-configuration-change-hook > to update the current tab name on every window configuration change. > Or at least to use this hook when tab-bar-mode is disabled. > > Or there is an alternative - to update the current tab name > explicitly in every command that uses tab names, and even in > their interactive spec that reads a tab name. That's what I did (see my original message), and I think it is sufficient --- there is no need to involve any hooks: Just declare that `tab-bar-tabs' is the "single source of truth" for all but the lowest-level functions, and update the current tab name (and, possibly, window configuration?) at its start.