unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Tabs are ready? -> Let us give a definition of tabs.
@ 2012-02-04 22:36 Alin Soare
  2012-02-05 10:42 ` martin rudalics
  0 siblings, 1 reply; 71+ messages in thread
From: Alin Soare @ 2012-02-04 22:36 UTC (permalink / raw)
  To: martin rudalics; +Cc: Juri Linkov, Juanma Barranquero, Emacs Dev

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

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

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

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2012-02-28 15:16 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 22:36 Tabs are ready? -> Let us give a definition of tabs Alin Soare
2012-02-05 10:42 ` martin rudalics
2012-02-05 12:44   ` Alin Soare
2012-02-05 13:17     ` martin rudalics
2012-02-05 13:39       ` Alin Soare
     [not found]         ` <CA+Xtq3U5PkH=m1ZRMMm2LJQ_BHZXc08Vk4TbhNyyFLta+1EkBw@mail.gmail.com>
2012-02-05 13:44           ` Fwd: " Alin Soare
2012-02-05 14:50             ` Alin Soare
2012-02-05 17:56               ` Andy Moreton
2012-02-05 18:51                 ` Drew Adams
2012-02-06  3:35                   ` Stephen J. Turnbull
2012-02-05 18:16               ` martin rudalics
2012-02-05 21:33                 ` Alin Soare
2012-02-06 10:35                   ` martin rudalics
2012-02-06 13:21                     ` Alin Soare
2012-02-05 23:56                 ` Alin Soare
2012-02-06 10:36                   ` martin rudalics
2012-02-06 13:34                     ` Alin Soare
2012-02-06 14:46                       ` Stephen J. Turnbull
2012-02-06 16:18                         ` Alin Soare
2012-02-06 16:21                           ` Alin Soare
2012-02-06 17:53                           ` Stephen J. Turnbull
2012-02-06 22:51                             ` Alin Soare
2012-02-06 22:55                               ` Alin Soare
2012-02-07 16:15                               ` Stephen J. Turnbull
2012-02-09 15:55                               ` PJ Weisberg
2012-02-09 16:11                                 ` Alin Soare
2012-02-09 16:16                                   ` Alin Soare
2012-02-10 19:04                                     ` Alin Soare
2012-02-10 19:08                                       ` Alin Soare
2012-02-11 14:16                                     ` Nix
2012-02-11 14:41                                       ` Alin Soare
2012-02-12 13:40                                         ` Nix
2012-02-12 16:23                                           ` Alin Soare
2012-02-12 18:48                                             ` Alin Soare
2012-02-13  6:06                                       ` Stephen J. Turnbull
2012-02-13 12:29                                         ` Nix
2012-02-13 15:53                                           ` Tom Tromey
2012-02-13 16:21                                             ` Nix
2012-02-13 16:30                                               ` Tom Tromey
2012-02-13 18:50                                                 ` Nix
2012-02-15 20:35                                                   ` Tom Tromey
2012-02-15 22:59                                                     ` Stefan Monnier
2012-02-15 23:03                                                     ` Nix
2012-02-28 15:13                                                       ` Alin Soare
2012-02-28 15:16                                                         ` Alin Soare
2012-02-13 13:24                                         ` Stefan Monnier
2012-02-13 13:49                                           ` Nix
2012-02-13 15:20                                             ` Stefan Monnier
2012-02-13 16:21                                               ` Nix
2012-02-06 18:00                         ` martin rudalics
2012-02-06 17:05                       ` martin rudalics
2012-02-05 18:15         ` martin rudalics
2012-02-05 21:38           ` Alin Soare
2012-02-05 22:30             ` joakim
2012-02-05 22:53               ` Alin Soare
2012-02-06 10:35             ` martin rudalics
2012-02-06 13:25               ` Alin Soare
2012-02-06 17:03                 ` martin rudalics
2012-02-06 19:19                   ` Nix
2012-02-06 19:43                     ` martin rudalics
2012-02-06 19:45                       ` Nix
2012-02-06 19:54                       ` Drew Adams
2012-02-08 23:43                         ` Alin Soare
2012-02-09 11:19                           ` Nix
2012-02-09 13:05                             ` Alin Soare
2012-02-09 13:07                               ` Alin Soare
2012-02-07 15:57                     ` Stephen J. Turnbull
2012-02-07 17:15                       ` Nix
2012-02-06 20:05                   ` Alin Soare
2012-02-07 16:03                     ` Stephen J. Turnbull
2012-02-06 17:04                 ` martin rudalics

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).