unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Gtk tabs in emacs, new branch.
@ 2010-04-09  9:47 A. Soare
  2010-04-09 11:15 ` Jan D.
  0 siblings, 1 reply; 154+ messages in thread
From: A. Soare @ 2010-04-09  9:47 UTC (permalink / raw)
  To: Jan D.; +Cc: Emacs   Dev  [emacs-devel]


> It is too early to tell.  The implementation and design is still 
> evolving.  Implementations other than for Gtk+ makes sense in any case.
> 
> 	Jan D.


Before the implementation that I have in mind now, I have tried more versions, and I gave up.

I do not want to add widgets to an implementation based on another idea , than that of a lisp function for all kinds of events: a lisp function at the creation, a function when closing, switching, etc.

So I do not want to work on an already - implemented version of tabs, as time as that implementation does not share this idea.

It does not matter, I can do other tasks for emacs, if tabs will be implemented by someone else.


Alin
---
Wenn ich Kultur höre, nehme ich meine Pistole.



____________________________________________________

 Voila People a retrouvé les photos que les stars aimeraient oublier sur http://people.voila.fr/people/mediatheque/dossiers/ces-stars-pour-qui-le-temps-a-bien-fait-les-choses.html







^ permalink raw reply	[flat|nested] 154+ messages in thread
* RE: Gtk tabs in emacs, new branch.
@ 2010-04-13 19:53 grischka
  0 siblings, 0 replies; 154+ messages in thread
From: grischka @ 2010-04-13 19:53 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-devel

 > It's not clear to me, for example, what you mean by tabs (necessarily)
 > doing the same thing to different objects.

See, tabs are defined by their shape, more by their placement and
mostly by their action.  Which is to "switch content in the associated
window".  If it does not perform this action then it is not a tabs
control but just a row of buttons.

To give another example:  A scrollbar is defined mostly by its action
to "scroll content in the associated window".  Of course you could use
the scrollbar widget just as well to adjust your speaker volume, but
then it wouldn't be a scrollbar, even if it looked like one.

Aside from that it is completely unnecessary and boring to overload
widgets with alien functionality.  If for example you like to have
a row of buttons to switch color themes in the buffer, then well,
just use a row of (possibly colored) buttons.

--- grischka





^ permalink raw reply	[flat|nested] 154+ messages in thread
* Re: Gtk tabs in emacs, new branch.
@ 2010-04-10 17:33 A. Soare
  0 siblings, 0 replies; 154+ messages in thread
From: A. Soare @ 2010-04-10 17:33 UTC (permalink / raw)
  To: Juri Linkov
  Cc: Jan D., Lennart Borgman, Stefan Monnier, Emacs Dev [emacs-devel]

I did understand what he did; I did the same 2 years ago, and gave up, because it is a rude method of implementing tabs for emacs in this manner.

I suggest you to do something like that:

opening a new tab, a function will initialize the structure of that tab.

For example, if you want a tab to represent a window-configuration, it will need an initialization function like that:

(let (new-tab (get-current-window-configuration))
     ...)

or , if you want the tab  to switch to *scratch* buffer,


(switch-to-buffer *scratch), etc

Every tab should have also a function of hide-event, in which it saves its old configuration, like

(setq new-tab (get-current-conf))

etc.


You might need a tab to represent a buffer of a compilation, or to start a compilation and switch to its buffer. In this case of use of a tab, you need no need of initializing a tab as a win-conf, etc.

It will be needed a local environment to a tab, such that the function associated to close/switch/hide be able to find the same new-tab variable, as initialized by init-function, and be hidden in other tabs, etc

I suggest you not to hurry to install the tabs as implemented by Jan D. Once installed, it might be difficult in future to switch to a nice implementation of tabs.

I have written the tabs for console, and if they are implemented as I like, I will send it when I have time.

Please, do not hurry to install such an implementation. Please improve it to accept lisp function for every gtk event, etc, before installing, and to suppose nothing about what a tab is.








____________________________________________________

 Voila People a retrouvé les photos que les stars aimeraient oublier sur http://people.voila.fr/people/mediatheque/dossiers/ces-stars-pour-qui-le-temps-a-bien-fait-les-choses.html







^ permalink raw reply	[flat|nested] 154+ messages in thread
* Re: Gtk tabs in emacs, new branch.
@ 2010-04-09 13:33 A. Soare
  0 siblings, 0 replies; 154+ messages in thread
From: A. Soare @ 2010-04-09 13:33 UTC (permalink / raw)
  To: Jan D.; +Cc: Emacs   Dev  [emacs-devel]


> A. Soare wrote:
> 
> > 
> > I do not want to add widgets to an implementation based on another
> > idea , than that of a lisp function for all kinds of events: a lisp
> > function at the creation, a function when closing, switching, etc.
> 
> It isn't any "idea" as such, it is practicallity and user experience. 
> For example, I tried having switching in elisp, but it is too slow 
> (causes flicker) and there are race conditions between when the widget 
> does the switching and when Emacs thinks the switch is done.
> 
> There is nothing in the current implementation that excludes lisp 
> functions for switching, creation, e.t.c, but it doesn't give any 
> advantages, just complications.
> 
> Also, creation may be by drag and drop from other frames.  Due to the 
> way Gtk+ implements this, and how Emacs lisp may interact with GUI 
> callbacks, doing that in lisp isn't possible.
> 
> Having an idea may be good, but sometimes reality requires other ways.
> 


Ok, good luck.



____________________________________________________

 Voila People a retrouvé les photos que les stars aimeraient oublier sur http://people.voila.fr/people/mediatheque/dossiers/ces-stars-pour-qui-le-temps-a-bien-fait-les-choses.html







^ permalink raw reply	[flat|nested] 154+ messages in thread
* Re: Gtk tabs in emacs, new branch
@ 2010-04-01 16:52 Angelo Graziosi
  2010-04-01 17:45 ` Jan Djärv
                   ` (2 more replies)
  0 siblings, 3 replies; 154+ messages in thread
From: Angelo Graziosi @ 2010-04-01 16:52 UTC (permalink / raw)
  To: Emacs

Jan D. wrote:
> Hello.
>
>
> I've published a new branch...

I have build that, but when I start Emacs, I don't 'see' any tabs. How 
can we enable those? I have a desktop file which opens several file when 
I start Emacs, so I would expect to see them in tabs! :-)

Perhaps we need something like 'M-x tabs-mode' (by default possibly! :-))

When I use 'M-x tab-new', I see a single buffer in two tabs. After 
closing the tabs, switching buffer as usually, with mouse-1/-3 on mode 
line, Emas becomes very slow, perhaps it hangs...

Anyway, thanks a lot for this new 'era' in Emacs!

Ciao,
Angelo.




^ permalink raw reply	[flat|nested] 154+ messages in thread
* Gtk tabs in emacs, new branch.
@ 2010-04-01 13:07 Jan Djärv
  2010-04-01 13:24 ` Leo
                   ` (3 more replies)
  0 siblings, 4 replies; 154+ messages in thread
From: Jan Djärv @ 2010-04-01 13:07 UTC (permalink / raw)
  To: emacs-devel

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

Hello.

I've published a new branch (I hope, it is the first time I do this) that adds 
Gtk+ tabs to Emacs, it is at bzr.savannah.gnu.org/srv/bzr/emacs/gtk-tabs.

Tabs isn't visible internally, it looks like just one frame at the lisp level. 
    Window configurations are used when switching between tabs.  I think this 
may cause flicker on slower machines.  Making Emacs use Gtk+ double buffering 
here would help.  I may violate running Lisp from C restrictions here, but I 
am not sure.  Tabs most likely introduces new frame sizing errors.

The TODO file talks about tabs on each window.  To make this happen, at least 
for Gtk+, each window needs to be its own widget, instead of one widget per 
frame as we have now.  This is a bigger task.

You can drag tabs to reorder them, drop them on another frame to move it there
and drop on the root window to create a new frame.

The tabs themselves should be smaller IMHO, but the x to delete a tab makes 
them larger than the text.

Lisp code is in native-tabs.el.  Keybindings are:

       (global-set-key "\C-x7\C-f" 'find-file-new-tab)
       (global-set-key "\C-x70" 'tab-delete)
       (global-set-key "\C-x71" 'tab-delete-other)
       (global-set-key "\C-x72" 'tab-new)
       (global-set-key "\C-x7f" 'find-file-new-tab)
       (global-set-key "\C-x7o" 'tab-next)
       (global-set-key "\C-x7n" 'tab-next)
       (global-set-key "\C-x7p" 'tab-previous)))


The lisp interface is:

(find-file-new-tab (filename &optional wildcards)

Edit file FILENAME, in a new tab.

(tab-new &optional LABEL FRAME)

Create a new tab with label LABEL in frame FRAME.
If LABEL is nil, use current buffer name.
FRAME nil means use the selected frame.

Returns the key for the tab, which can be passed to `tab-delete'.

(tab-delete &optional KEY FRAME)

Remove tab KEY from frame FRAME.
KEY is what `tab-new' returned or nil, which means the current tab.
FRAME nil means use the selected frame.

(tab-delete-other &optional FRAME)

Remove all tabs from frame FRAME except the current one.
FRAME nil means use the selected frame.

(tab-set-label LABEL &optional FRAME)

Set label for the current tab in frame FRAME to LABEL.
LABEL nil means use current buffer name.
FRAME nil means use the selected frame.

(tab-next &optional FRAME)

Go to the next tab on frame FRAME.
Wrap around to the beginning if current tab is last.
FRAME nil means use the selected frame.

(tab-previous &optional FRAME)

Go to the previous tab on frame FRAME.
Wrap around to the end if current tab is first.
FRAME nil means use the selected frame.

I'm sure there are tons of bugs.  I have not compiled this tree for anything 
other than Gtk+.

	Jan D.


[-- Attachment #2: tabs.png --]
[-- Type: image/png, Size: 37832 bytes --]

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

end of thread, other threads:[~2010-04-25  9:15 UTC | newest]

Thread overview: 154+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09  9:47 Gtk tabs in emacs, new branch A. Soare
2010-04-09 11:15 ` Jan D.
2010-04-10  1:22   ` Stefan Monnier
2010-04-10  1:36     ` Juri Linkov
2010-04-10  6:12       ` Jan Djärv
2010-04-11  1:16         ` Juri Linkov
2010-04-11 12:50           ` Tobias C. Rittweiler
2010-04-11 15:40             ` David De La Harpe Golden
2010-04-11 15:28           ` David De La Harpe Golden
2010-04-11 16:05             ` Stefan Monnier
2010-04-11 18:32               ` Jan Djärv
2010-04-12 23:47                 ` Juri Linkov
2010-04-13  3:50                   ` Stefan Monnier
2010-04-13  5:29                     ` Juri Linkov
2010-04-13 13:05                       ` Stefan Monnier
2010-04-13 23:34                         ` Header windows (was: Gtk tabs in emacs, new branch.) Juri Linkov
2010-04-14  5:03                         ` Gtk tabs in emacs, new branch Richard Stallman
2010-04-14 14:30                           ` Stefan Monnier
2010-04-13  6:53                     ` Stephen J. Turnbull
2010-04-13 12:28                       ` Stefan Monnier
2010-04-13  5:53                   ` Jan Djärv
2010-04-13 12:30                     ` Stefan Monnier
2010-04-13 20:54                       ` Jan Djärv
2010-04-21 16:58                       ` Text in Gtk tool bar. (Was: Gtk tabs in emacs, new branch.) Jan Djärv
2010-04-23  8:35                         ` Juri Linkov
2010-04-23  9:33                           ` Jan D.
2010-04-23 16:46                             ` Juri Linkov
2010-04-23 17:47                               ` Jan Djärv
2010-04-11 18:09             ` Gtk tabs in emacs, new branch Drew Adams
2010-04-12 23:45             ` Juri Linkov
2010-04-13  2:42               ` Stephen J. Turnbull
2010-04-13  6:29                 ` Jan Djärv
2010-04-13 17:59                 ` Eli Zaretskii
2010-04-13 18:15                   ` Jan Djärv
2010-04-13 18:44                     ` Eli Zaretskii
2010-04-10  1:47     ` Lennart Borgman
2010-04-10  2:19       ` Juri Linkov
2010-04-10  6:15       ` Jan Djärv
2010-04-10  9:14         ` Lennart Borgman
2010-04-10  9:46           ` joakim
2010-04-10 10:18             ` Lennart Borgman
2010-04-10 11:01               ` joakim
2010-04-10 12:38               ` Štěpán Němec
2010-04-10 14:58               ` Stefan Monnier
2010-04-10 10:58             ` Jan Djärv
2010-04-10 12:09               ` joakim
2010-04-11  1:18             ` Juri Linkov
2010-04-10 10:52           ` Jan Djärv
2010-04-10  5:51     ` Jan Djärv
2010-04-10 15:19       ` Stefan Monnier
2010-04-10 15:33         ` Chong Yidong
2010-04-10 18:51           ` Stefan Monnier
2010-04-10 16:10         ` Jan Djärv
2010-04-10 16:40           ` David De La Harpe Golden
2010-04-10 17:06             ` Jan Djärv
2010-04-10 16:42           ` Davis Herring
2010-04-10 17:11             ` Jan Djärv
2010-04-10 17:16               ` Davis Herring
2010-04-10 17:54                 ` Jan Djärv
2010-04-10 18:44                   ` David De La Harpe Golden
2010-04-10 19:14                     ` Jan Djärv
2010-04-10 19:51                       ` David De La Harpe Golden
2010-04-10 21:12                       ` Stefan Monnier
2010-04-11 10:56                         ` Jan Djärv
2010-04-11 15:09                           ` Stefan Monnier
2010-04-10 19:00           ` Stefan Monnier
2010-04-10 19:07             ` Jan Djärv
2010-04-10 19:56               ` David De La Harpe Golden
2010-04-12 16:14         ` Jan Djärv
2010-04-12 19:18           ` Stefan Monnier
2010-04-12 20:22             ` Jan Djärv
2010-04-12 21:02               ` Stefan Monnier
2010-04-13 15:08         ` René Kyllingstad
2010-04-10 16:06       ` David De La Harpe Golden
2010-04-11 12:11       ` Stephen J. Turnbull
2010-04-11 18:09         ` Drew Adams
2010-04-12 23:49           ` Juri Linkov
2010-04-13  2:58             ` Drew Adams
2010-04-13  4:11               ` Stephen J. Turnbull
2010-04-13 16:15                 ` Drew Adams
2010-04-14 10:30                   ` Stephen J. Turnbull
  -- strict thread matches above, loose matches on Subject: below --
2010-04-13 19:53 grischka
2010-04-10 17:33 A. Soare
2010-04-09 13:33 A. Soare
2010-04-01 16:52 Angelo Graziosi
2010-04-01 17:45 ` Jan Djärv
2010-04-01 18:03   ` Juri Linkov
2010-04-01 20:18     ` Jan Djärv
2010-04-02  7:10       ` Jan Djärv
2010-04-01 20:51   ` Angelo Graziosi
2010-04-02  6:49     ` Jan Djärv
2010-04-02  9:21       ` Angelo Graziosi
2010-04-02  2:06   ` Stephen J. Turnbull
2010-04-02  7:00     ` Jan Djärv
2010-04-02  6:53 ` Jan Djärv
2010-04-02  9:59   ` Angelo Graziosi
2010-04-02 15:10     ` Jan Djärv
2010-04-02 16:55       ` Angelo Graziosi
2010-04-05  8:50       ` Angelo Graziosi
2010-04-10 12:44         ` Jan Djärv
2010-04-10 17:34           ` Angelo Graziosi
2010-04-10 18:03             ` Jan Djärv
2010-04-10 22:09               ` Angelo Graziosi
2010-04-11  5:45                 ` Jan Djärv
2010-04-11  8:16                   ` Angelo Graziosi
2010-04-11 10:52                     ` Jan Djärv
2010-04-11 17:28                       ` Angelo Graziosi
2010-04-11 18:33                         ` Jan Djärv
2010-04-21  8:55                         ` Juri Linkov
2010-04-21  9:46                           ` David Kastrup
2010-04-21 15:43                             ` Juri Linkov
     [not found]                               ` <jwv633k4rn2.fsf-monnier+emacs@gnu.org>
2010-04-22  8:16                                 ` Juri Linkov
2010-04-22 15:08                                   ` Jan Djärv
2010-04-23  8:33                                     ` Juri Linkov
2010-04-21 13:54                           ` Angelo Graziosi
2010-04-21 15:45                           ` Juri Linkov
2010-04-21 16:04                             ` Jan Djärv
2010-04-22  8:14                               ` Juri Linkov
2010-04-22 16:20                                 ` Juanma Barranquero
2010-04-24 18:45                                   ` Juri Linkov
2010-04-23 16:53                             ` Drew Adams
2010-04-23 18:02                               ` Juri Linkov
2010-04-23 18:28                                 ` Drew Adams
2010-04-24  9:17                                   ` Juri Linkov
2010-04-24 14:41                                     ` Drew Adams
2010-04-24 18:49                                       ` Juri Linkov
2010-04-24 19:24                                         ` Drew Adams
2010-04-25  5:36                                           ` Juri Linkov
2010-04-25  9:15                                             ` martin rudalics
2010-04-10 19:19             ` Stefan Monnier
2010-04-02 16:19     ` Uwe Siart
2010-04-02 18:31       ` Daniel Colascione
2010-04-02 20:38         ` Stefan Monnier
2010-04-03  6:29         ` Uwe Siart
2010-04-03  9:07           ` Uwe Siart
2010-04-02  6:53 ` Uwe Siart
2010-04-02  7:25   ` Jan Djärv
2010-04-04 11:01     ` Juri Linkov
2010-04-02 12:19   ` Stephen J. Turnbull
2010-04-01 13:07 Jan Djärv
2010-04-01 13:24 ` Leo
2010-04-01 18:02 ` Juri Linkov
2010-04-01 20:13   ` Jan Djärv
2010-04-09 23:27     ` Juri Linkov
2010-04-09 23:54       ` Drew Adams
2010-04-10  0:17         ` Juri Linkov
2010-04-10  2:56       ` YAMAMOTO Mitsuharu
2010-04-11  1:06         ` Juri Linkov
2010-04-01 18:50 ` Chong Yidong
2010-04-01 20:08   ` Jan Djärv
2010-04-01 20:09   ` Jan Djärv
2010-04-01 21:53   ` Stefan Monnier
2010-04-09  7:23 ` alin.s
2010-04-09  9:34   ` Jan D.

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