unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alin Soare <as1789@gmail.com>
To: Emacs Dev <emacs-devel@gnu.org>
Subject: Tabs for console.
Date: Wed, 27 Oct 2010 23:34:37 +0300	[thread overview]
Message-ID: <AANLkTim3+4ts1VtnLUdWLqYrkVP0WT6N22xo7q_iD9WX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTim8zuFRh2L81g9KgtDon=U5Mvr+QO+HWGE1nqXP@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3605 bytes --]

I send again my previous message, because my previous message contained the
attachments, and on emacs-devel lists seems there were errors inside the
text.


I do not attach the patch again (it has unciompressed more than 700K, and it
is not complete ). I hope to send it without errors now.

------


I worked long time ago on tabs for console, as many of you already know.

1 year ago I reopened the tabs, and started from scratch, having a different
idea. Afterwards I realized the idea was not good, and gave up again.

3 days ago I reopened the problem, and started to re-written it again from
scratch.

Concretely, this time I do not want to miss again.

I do not want to work alone this time. I want to receive your suggestions.

I have already talked about this with Stefan Monnier, and I want to
implement it as agreed with him.

A tab is a formed from a few scripts: an initialization script, an
activation script, a deactivation script, etc.

Here is the patch.

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 deact-tab
      '( (message "hide tab") ) )

(make-tab (list (cons 'tab-code:init init-tab )
        (cons 'tab-code:activate act-tab )
        (cons 'tab-code:deactivate deact-tab )
        ) )

(activate-tab 0)

The parameter '0' of `activate-tab' means to activate the first TAB of the
selected frame. It calls the activation script of the first tab, after it
calls the deactivation script of the last activated tab (if any).

I attach the output of git diff, and a test file test-tabs.el.

In order to test it, you have to evaluate make-tab a few times, and
afterwards (activate-tab 0)

There is some code inserted in patch, and commented . It rested from the
previous tries to do the tabs, and it is no longer useful.

Do not expect too much ; the patch I send today makes emacs crash after a
short period of use of tabs :). Do not install it on your good sources :).
(the garbage collector makes it crash, and i do not see what variable is not
protected using gcpro..). This is of second importance for now. The bugs
will be corrected. Also, take care that the cashes of fonts are not cleared,
and when you switch to the tab-frame, the redisplay-internal will not
display correctly, and crashes. I forgot how to initialize the fonts for a
frame. When you switch back with a command like

 (let ((f (car
(frame-list))))

  (select-frame f))

it displays the main frame correctly.

For me to be able to finish this work, it is important/crucial for you to
suggest me how to do it, in order to agree on the behavior of tabs. It is
sure I cannot do this job alone. On the other hand, please report me bugs,
and suggestions to solve them :) )

I definitively want to make the tabs as scripts. A particular set of scripts
will create tabs as frames, another set as window-configurations, another
set will be tabs for compilation, etc. Had emacs had lexical scoping, it
would be easier to define the scripts. In dynamic scoping, for each tab one
needs a variable with a different name to keep a tab-frame inside the
scripts of that tab. I also modified make-terminal-frame, in order to be
able to create frames that are not linked into frame-list. I call the frames
of frame-list "main frames" (as you see in frame.h).

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.


Alin.

[-- Attachment #2: Type: text/html, Size: 4535 bytes --]

  parent reply	other threads:[~2010-10-27 20:34 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTim8zuFRh2L81g9KgtDon=U5Mvr+QO+HWGE1nqXP@mail.gmail.com>
2010-10-27 16:39 ` Fwd: Tabs for console Alin Soare
2010-11-08 19:22   ` Stefan Monnier
2010-11-08 19:51     ` Alin Soare
     [not found]       ` <AANLkTim8BoGpECQUUNfPidbn2k_HP77sykR=HYqw9BOE@mail.gmail.com>
     [not found]         ` <AANLkTinPBfV8OC7d9qOBWGW6130D2nXjg+=Nv2rKqMr1@mail.gmail.com>
     [not found]           ` <jwvhbewqnjj.fsf-monnier+emacs@gnu.org>
2010-12-02 22:43             ` Alin Soare
2010-12-02 22:45               ` Alin Soare
2010-12-03  8:19                 ` martin rudalics
2010-12-03  9:37                 ` Andreas Schwab
2010-12-04 21:48                   ` Alin Soare
2010-12-03  9:52                 ` Andreas Schwab
2010-12-03 11:11                   ` Alin Soare
2010-12-03 12:29                     ` Dimitri Fontaine
2010-12-04 21:42                       ` Alin Soare
2010-12-04 21:55                       ` Alin Soare
2011-03-11  8:52       ` A Soare
     [not found]     ` <AANLkTikwua2bfyvJkt+sn2vR_CzTZA6Hs0Lw=NJSVwT4@mail.gmail.com>
     [not found]       ` <jwvd3peoig0.fsf-monnier+emacs@gnu.org>
     [not found]         ` <AANLkTikPRKbvq0mg2X1Huio1z5sF3UvF6+cpT10mH-H-@mail.gmail.com>
     [not found]           ` <jwvzksilkfd.fsf-monnier+emacs@gnu.org>
     [not found]             ` <AANLkTi=MiubmGJ_Gk9OVzHY7uc+DOkHHpj5Ht+j7uNx8@mail.gmail.com>
     [not found]               ` <jwvtyiqk2al.fsf-monnier+emacs@gnu.org>
     [not found]                 ` <AANLkTi=0g00xn2P_yKE0gGkH-ZaZSvz+8yY=yy2=-6W=@mail.gmail.com>
     [not found]                   ` <jwvsjyai7lv.fsf-monnier+emacs@gnu.org>
2010-12-07  4:47                     ` Fwd: " Alin Soare
2010-12-07  4:50                       ` Alin Soare
2010-12-07 17:06                       ` Stefan Monnier
2010-12-08  8:14                         ` Alin Soare
     [not found]                           ` <AANLkTikaXr_4bVR2_v7HVFfPB93Sw10e63cKqTRwOunS@mail.gmail.com>
2010-12-08 11:16                             ` Alin Soare
2010-12-09  4:29                           ` Fwd: " Stefan Monnier
2010-12-09  8:26                             ` Alin Soare
2010-12-10  3:35                               ` Stefan Monnier
2010-12-10  8:15                                 ` Alin Soare
2010-12-10 20:13                                   ` Stefan Monnier
2010-12-10 21:09                                     ` Alin Soare
2010-12-10 21:23                                       ` Davis Herring
2010-12-10 21:34                                         ` Alin Soare
2010-12-12 20:02                                           ` Alin Soare
2010-12-13 17:23                                             ` Stefan Monnier
2010-12-13 21:01                                               ` Alin Soare
2010-12-14 15:25                                 ` Alin Soare
2010-10-27 20:34 ` Alin Soare [this message]
2010-10-29  7:49 Alin Soare
  -- strict thread matches above, loose matches on Subject: below --
2010-12-21  1:14 Richard Stallman

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=AANLkTim3+4ts1VtnLUdWLqYrkVP0WT6N22xo7q_iD9WX@mail.gmail.com \
    --to=as1789@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).