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: Fri, 10 Sep 2021 19:17:33 +0300 Organization: LINKOV.NET Message-ID: <87bl50fozu.fsf@mail.linkov.net> References: <79741d39.2e84.17bce00d409.Coremail.tumashu@163.com> <87o8916jqb.fsf@mail.linkov.net> <340a0f4.6ac9.17bcfeccbb7.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="25476"; 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 Fri Sep 10 18:22:13 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 1mOjI5-0006Sd-Nj for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Sep 2021 18:22:13 +0200 Original-Received: from localhost ([::1]:38636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOjI4-0004Tx-IB for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Sep 2021 12:22:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOjGF-0002b4-0k for emacs-devel@gnu.org; Fri, 10 Sep 2021 12:20:19 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:55191) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOjGC-0004DJ-OY for emacs-devel@gnu.org; Fri, 10 Sep 2021 12:20:18 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A22074000D; Fri, 10 Sep 2021 16:20:13 +0000 (UTC) In-Reply-To: <340a0f4.6ac9.17bcfeccbb7.Coremail.tumashu@163.com> (tumashu@163.com's message of "Fri, 10 Sep 2021 21:36:47 +0800 (CST)") Received-SPF: pass client-ip=217.70.183.194; envelope-from=juri@linkov.net; helo=relay2-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:274521 Archived-At: > I have two tabs: > > 1. *scratch* 2. *scratch*, *Messages* > > and current-tab is 2 > > if I switch-to-buffer *scratch*, it will switch to tab 1, instead of > jump to window '*scratch*' in current tab. > > for current-tab is not at the beginning of tabs. Please send your customized settings related to tab-bar. I see that you set 'tab-bar-tab-name-function' to 'tab-bar-tab-name-all'. What other tab-bar customization do you have that causes buffer-switching also select another tab? Is it something in display-buffer-alist that is customized to use display-buffer-in-tab? >>> If ALIST contains a `reusable-frames' entry, its value determines >>> which frames to search for a reusable tab: >>> - nil -- the selected frame (actually the last non-minibuffer frame) >>> + nil -- do not reuse any frames. >>> A frame -- just that frame >>> `visible' -- all visible frames >>> 0 -- all frames on the current terminal >>> t -- all frames. >>> + others -- selected frame. >> >> I wonder where did you get the value 'others' that means the selected frame? > > (defun tab-bar--reusable-frames (all-frames) > (cond > ((eq all-frames t) (frame-list)) > ((eq all-frames 'visible) (visible-frame-list)) > ((framep all-frames) (list all-frames)) > (t (list (selected-frame))))) Thanks, I thought that `others' is a symbol because is looks like `visible'. If you meant that all other values affect the selected frame, then better to use such wording: "other non-nil values".