The patch I sent contained a bug of garbage collerctor, and more than that it was not commented. I am preparing now a patch that contains - no bug - comments - minimal code, that takes no action apart from showing the tabs. I will resend the patch again in a few days, when I have time to complete it, and we will discuss again about what a tab should do, in order to implementent what you ask for a tab, etc. See you soon. alin 2010/11/8 Stefan Monnier > > A tab is a formed from a few scripts: an initialization script, and > > activation script, an deactivation script, etc. > > > Here is the patch. > > The patch is huge and includes a lot of irrelevant changes (mostly > reverting recent changes), so it's not readable as sent. > Make sure you send a diff that's relative to the code that you modified, > and not to some other version of the code: check the patch visually and > if you see a change in there which *you* did not write, then the patch > is wrong (i.e. you're calling git with incorrect arguments). > > > I tried to create a tab that represents a frame with this code: > > > (setq init-tab > > '( (+ 1 2) > > (setq fr (make-terminal-frame '((tab . t)))) ) ) > > > (setq act-tab > > '( (message "activate") > > (select-frame fr) ) ) > > > (setq desact-tab > > '( (message "hide tab") ) ) > > > (make-tab (list (cons 'tab-code:init init-tab ) > > (cons 'tab-code:activate act-tab ) > > (cons 'tab-code:desactivate desact-tab ) > > ) ) > > > (activate-tab 0) > > I don't know what the above means. Please explain what the above is > meant to do and in what way. > > One problem I see with the above is that it uses quoted code, which has > the major disadvantage of not being byte-compilable. Always try and use > functions instead of quoted code. Something like: > > (setq init-tab > (lambda () > (+ 1 2) > (setq fr (make-terminal-frame '((tab . t)))))) > > (setq act-tab > (lambda () > (message "activate") > (select-frame fr))) > > (setq desact-tab > (lambda () > (message "hide tab"))) > > > The parameter '0' of `activate-tab' means to activate the first TAB of > the > > selected frame. > > Why? Are they numbered? > > > For the next period of time I am able to work on this. I am waiting for > your > > suggestions. It depends only on you if I continue to work and finish the > > tabs for console or not. > > Are your tabs "per-frame" or "per-window", or something else? > > > Stefan >