From: tumashu <tumashu@163.com>
To: "Juri Linkov" <juri@linkov.net>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re:Re: [patch] two patchs about tab-bar.el
Date: Fri, 10 Sep 2021 21:18:51 +0800 (CST) [thread overview]
Message-ID: <daa1134.6912.17bcfdc6179.Coremail.tumashu@163.com> (raw)
In-Reply-To: <87o8916jqb.fsf@mail.linkov.net>
At 2021-09-10 14:33:48, "Juri Linkov" <juri@linkov.net> wrote:
>> * lisp/tab-bar.el (tab-bar-get-buffer-tab): Fix issue when
>> 'current-tab is not at the beginning of tabs.
>>
>> --- a/lisp/tab-bar.el
>> +++ b/lisp/tab-bar.el
>> @@ -1940,7 +1940,9 @@ tab-bar-get-buffer-tab
>> - (funcall tab-bar-tabs-function frame)))
>> + (let ((tabs (funcall tab-bar-tabs-function frame)))
>> + ;; Make sure current-tab is alway at the beginning of tabs.
>> + (push (assq 'current-tab tabs) tabs))))
>
>Please explain what problem this patch is intended to fix.
I have two tabs:
1. *scratch* 2. *scratch*, *Messages*
and current-tab is 2
if I switch-to-buffer *scratch*, it will jump to tab 1, instead of to jump to window '*scratch*' in current tab.
for the current-tab is not at the begin of tabs.
(cl-prettyprint (tab-bar-tabs))
((tab (name . "*scratch*")
(explicit-name)
(time . 1631279460.570877)
(ws ((min-height . 4)
(min-width . 10)
(min-height-ignore . 3)
(min-width-ignore . 4)
(min-height-safe . 1)
(min-width-safe . 2)
(min-pixel-height . 92)
(min-pixel-width . 100)
(min-pixel-height-ignore . 69)
(min-pixel-width-ignore . 40)
(min-pixel-height-safe . 23)
(min-pixel-width-safe . 20))
leaf
(pixel-width . 1366)
(pixel-height . 663)
(total-width . 137)
(total-height . 28)
(normal-height . 1.0)
(normal-width . 1.0)
(buffer "*scratch*"
(selected . t)
(hscroll . 0)
(fringes 8 8 nil nil)
(margins nil)
(scroll-bars nil 0 t nil 0 t nil)
(vscroll . 0)
(dedicated)
(point . 1)
(start . 1)))
(wc . #<window-configuration>)
(wc-point . #<marker at 1 in *scratch*>)
(wc-bl #<buffer *scratch*> #<buffer *Minibuf-1*>)
(wc-bbl)
(wc-history-back ((wc . #<window-configuration>)
(wc-point . #<marker at 1 in *scratch*>))
((wc . #<window-configuration>)
(wc-point . #<marker at 1 in *scratch*>)))
(wc-history-forward))
(current-tab (name . "*scratch*, *Messages*") (explicit-name)))
>
>> --- a/lisp/tab-bar.el
>> +++ b/lisp/tab-bar.el
>> @@ -1962,11 +1962,12 @@ 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)))))
^^^^^^^^^^^^^^
next prev parent reply other threads:[~2021-09-10 13:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 4:39 [patch] two patchs about tab-bar.el tumashu
2021-09-10 6:33 ` Juri Linkov
2021-09-10 13:18 ` tumashu [this message]
2021-09-10 13:24 ` tumashu
2021-09-10 13:36 ` tumashu
2021-09-10 16:17 ` Juri Linkov
2021-09-10 18:33 ` tumashu
2021-09-12 7:03 ` Juri Linkov
2021-09-12 9:34 ` tumashu
2021-09-12 16:10 ` Juri Linkov
2021-09-10 23:48 ` Feng Shu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daa1134.6912.17bcfdc6179.Coremail.tumashu@163.com \
--to=tumashu@163.com \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).