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.devel Subject: Re: [patch] two patchs about tab-bar.el Date: Sun, 12 Sep 2021 10:03:04 +0300 Organization: LINKOV.NET Message-ID: <87k0jmjn9v.fsf@mail.linkov.net> References: <79741d39.2e84.17bce00d409.Coremail.tumashu@163.com> <87o8916jqb.fsf@mail.linkov.net> <79cc8889.2b.17bd0fcc54e.Coremail.tumashu@163.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: tumashu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 12 09:09:55 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mPJcg-00076a-Vy for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Sep 2021 09:09:54 +0200 Original-Received: from localhost ([::1]:51316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPJcf-0005SU-0p for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Sep 2021 03:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPJbc-0004kw-DH for emacs-devel@gnu.org; Sun, 12 Sep 2021 03:08:48 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:60113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPJba-0000uf-ET for emacs-devel@gnu.org; Sun, 12 Sep 2021 03:08:47 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 75D5060003; Sun, 12 Sep 2021 07:08:41 +0000 (UTC) In-Reply-To: <79cc8889.2b.17bd0fcc54e.Coremail.tumashu@163.com> (tumashu@163.com's message of "Sat, 11 Sep 2021 02:33:51 +0800 (CST)") Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@linkov.net; helo=relay3-d.mail.gandi.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274583 Archived-At: > This is my tab-bar config > > (setq display-buffer-alist > '((eh-display-buffer-in-tab-p > display-buffer-in-tab > (reusable-frames . visible)))) Thanks, now everything is clear. Then we need to decide what alist parameters should define your preference of using the current tab. One possible new parameter could be 'prefer-current-tab': (setq display-buffer-alist '((eh-display-buffer-in-tab-p display-buffer-in-tab (reusable-frames . visible) (prefer-current-tab . t)))) But 'tab-bar-get-buffer-tab' already has argument 'ignore-current-tab' that could be used to implement what you want. Then if someone doesn't want to prefer the current tab, this can be configured with: (setq display-buffer-alist '((eh-display-buffer-in-tab-p display-buffer-in-tab (reusable-frames . visible) (ignore-current-tab . t)))) So I propose to use the existing argument 'ignore-current-tab' with these meanings of its values: - nil: prefer the current tab; - t: ignore the current tab. Do you agree?