[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tabs are ready? -> Let us give a definition of tabs.
From: |
Alin Soare |
Subject: |
Re: Tabs are ready? -> Let us give a definition of tabs. |
Date: |
Sun, 5 Feb 2012 00:36:42 +0200 |
I propose you to give a general definition of a tab, otherwise it will be disagreement between the tabs of GTK/motif/console , etc.
I propose you a defintion. In choosing a definition, one must agree first of all on some
* general principles
** in C must be written as little as possible
** almost tab behaviour must be defined in elisp
Here what I propose:
The tabs should be a defined as a list of objects (of type 'tab) in the struct frame.
On the frame, the tab is represented as a widget in GTK/motif/ , or something similar in console.
A tab object should be defined as a list of association, in which every standard event is associated with an elisp function. Apart from events, it can be defined some constants, like tab-name, etc. It is useful to be able to insert in this this other variables, that can be seen as tab-local.
The events should be:
- create
the elisp funciton is executed once, immediately after the initialization of a tab
- hide
executed when the tab is hidden
- show
executed when we switch to that tab
etc.
Example: a tab that does nothing
To create a tab that does absolutely nothing, we define no elisp function for all events.
After the creation of such a tab, it will be visible in gtk widget, but commuting to it, nothing happens.
Other example: a tab that switches to a buffer assoc with a file, like /root/.emacs
- initialization event is defined so:
-- erase all windows, and keep 1 window ( delete-other-windows )
-- open the file . emacs
- hide event
-- memorize window configuration into a variable 'OLD-window-config inserted in the assoc list of the tab
- show event
-- restaurate 'OLD-window-config
- close event
-- eventually kill the buffer .emacs
In this manner one can define tabs to run processes in background, like compilations.
Etc.
I hope we could agree on such a definition of a tab.
I implemented it 2 years ago, and give a simple example , in which tabs saves and restore window-configurations.
Note that it require not too much work at C level, and it gives a huge number of possibilities of defining tabs, exactly as the 2 principles says.
Alin
- Re: Tabs are ready? -> Let us give a definition of tabs.,
Alin Soare <=
- Re: Tabs are ready? -> Let us give a definition of tabs., martin rudalics, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., Alin Soare, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., martin rudalics, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., Alin Soare, 2012/02/05
- Message not available
- Fwd: Tabs are ready? -> Let us give a definition of tabs., Alin Soare, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., Alin Soare, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., Andy Moreton, 2012/02/05
- RE: Tabs are ready? -> Let us give a definition of tabs., Drew Adams, 2012/02/05
- RE: Tabs are ready? -> Let us give a definition of tabs., Stephen J. Turnbull, 2012/02/05
- Re: Tabs are ready? -> Let us give a definition of tabs., martin rudalics, 2012/02/05