* Re: AW: Tabs in Emacs?
2009-11-17 13:59 ` AW: " Berndl, Klaus
@ 2009-11-17 14:47 ` Miles Bader
2009-11-18 9:40 ` AW: " Berndl, Klaus
2009-11-17 16:09 ` Jason Rumney
` (2 subsequent siblings)
3 siblings, 1 reply; 25+ messages in thread
From: Miles Bader @ 2009-11-17 14:47 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Angelo Graziosi, Emacs, Deniz Dogan
"Berndl, Klaus" <klaus.berndl@capgemini-sdm.com> writes:
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g. in Firefox) because the header-line is (mis-)used as tab-title/handle, so when using this mechanism to *simulate* tabs i have no headerline within the tabs... IMHO nothing what i would call "Tabs"...
Note that exactly tabs _should_ work in Emacs is actually quite
contentious (that's one of the reasons they haven't been implemented) --
Emacs has a significantly more complex model than most apps, and it's
not really clear the best way to map the usual sort of tab-bar onto that
model (read one of the long tortuous emacs-devel threads on this subject
for details I guess)...
-Miles
--
((lambda (x) (list x x)) (lambda (x) (list x x)))
^ permalink raw reply [flat|nested] 25+ messages in thread
* AW: AW: Tabs in Emacs?
2009-11-17 14:47 ` Miles Bader
@ 2009-11-18 9:40 ` Berndl, Klaus
2009-11-18 9:52 ` Miles Bader
0 siblings, 1 reply; 25+ messages in thread
From: Berndl, Klaus @ 2009-11-18 9:40 UTC (permalink / raw)
To: Miles Bader; +Cc: Angelo Graziosi, Emacs, Deniz Dogan
Well, cause of Emacs' complex model with buffers, windows displaying buffers and frames displaying windows and on top window-configurations there is no easy answer, i have to admit.
But nevertheless i will make try:
IMHO tabs should an a frame-basis and each tab should display window-configurations, i.e. switching to a tab X should display exactly the window-layout and contents as X has contained when the user has left it
And each window of the window-configuration of a tab should contain it's headerline...
Is this understandable?
Klaus
-----Ursprüngliche Nachricht-----
Von: Miles Bader [mailto:miles@gnu.org]
Gesendet: Dienstag, 17. November 2009 15:47
An: Berndl, Klaus
Cc: Deniz Dogan; Angelo Graziosi; Emacs
Betreff: Re: AW: Tabs in Emacs?
"Berndl, Klaus" <klaus.berndl@capgemini-sdm.com> writes:
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g. in Firefox) because the header-line is (mis-)used as tab-title/handle, so when using this mechanism to *simulate* tabs i have no headerline within the tabs... IMHO nothing what i would call "Tabs"...
Note that exactly tabs _should_ work in Emacs is actually quite
contentious (that's one of the reasons they haven't been implemented) --
Emacs has a significantly more complex model than most apps, and it's
not really clear the best way to map the usual sort of tab-bar onto that
model (read one of the long tortuous emacs-devel threads on this subject
for details I guess)...
-Miles
--
((lambda (x) (list x x)) (lambda (x) (list x x)))
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: AW: Tabs in Emacs?
2009-11-18 9:40 ` AW: " Berndl, Klaus
@ 2009-11-18 9:52 ` Miles Bader
2009-11-18 10:19 ` AW: " Berndl, Klaus
2009-11-18 14:56 ` AW: AW: " Stefan Monnier
0 siblings, 2 replies; 25+ messages in thread
From: Miles Bader @ 2009-11-18 9:52 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Deniz Dogan, Emacs, Angelo Graziosi
"Berndl, Klaus" <klaus.berndl@capgemini-sdm.com> writes:
> IMHO tabs should an a frame-basis and each tab should display window-configurations, i.e. switching to a tab X should display exactly the window-layout and contents as X has contained when the user has left it
> And each window of the window-configuration of a tab should contain it's headerline...
>
> Is this understandable?
Sure, but... it may not exactly be what's most convenient for users --
again, it's a hard issue.
While a window-configuration switching implementation is useful in some
cases (e.g. eclipses uses a sort of similar system for switching between
"debugging view" "browsing view" etc), how would the different
configurations get set up ? I can imagine a system that required
explicit user action ("add a new tab with current config"), but...
I think many users might just want to switch between buffers, and have
tabs automatically added for each buffer (perhaps limiting the number
displayed in a MRU fashion, e.g., how eclipse handles source file tabs).
That seems to be more similar to how tabs work in e.g. visual studio,
and other editors...
argh... :]
-miles
--
Suburbia: where they tear out the trees and then name streets after them.
^ permalink raw reply [flat|nested] 25+ messages in thread
* AW: AW: AW: Tabs in Emacs?
2009-11-18 9:52 ` Miles Bader
@ 2009-11-18 10:19 ` Berndl, Klaus
2009-11-18 19:08 ` Juri Linkov
2009-11-18 14:56 ` AW: AW: " Stefan Monnier
1 sibling, 1 reply; 25+ messages in thread
From: Berndl, Klaus @ 2009-11-18 10:19 UTC (permalink / raw)
To: Miles Bader; +Cc: Deniz Dogan, Emacs, Angelo Graziosi
Well - "argh" is well spoken ;-)
Another suggestion, or precisely a refined suggestion:
1. Introducing new commands which represents your scenario where opening a new buffer opens a new tab (e.g. find-file-other-tab, switch-to-buffer-other-tab, adapting display-buffer in an appropriate manner etc...) Optionally we could also introduce some new defcustoms which can define a default-behavior: e.g. using the standard window-related commands (e.g. find-file-other-window) automatically opens/uses other tabs ...
2. But in general tabs represent window-configs and leaving a tab X stores ist window-config in a suitable way so it can be restored when entering again tab X - all this has to be happen automatically! Often the window-config will only contain one window...
So when a user wants the tab=buffer relation, he has it - he just has to use Emacs in way so opening buffers and switching to buffers operates on tabs (see 1) - but the whole stuff is much more powerful for scenarios where a tab contains a full window-config. The latter one is similar to something like escreen.el and winring.el and could be usefol for running in one tab ECB, in another Gnus, in another GUD - like eclipse...
Thoughts?
-----Ursprüngliche Nachricht-----
Von: miles@gnu.org [mailto:miles@gnu.org]
Gesendet: Mittwoch, 18. November 2009 10:53
An: Berndl, Klaus
Cc: Angelo Graziosi; Emacs; Deniz Dogan
Betreff: Re: AW: AW: Tabs in Emacs?
"Berndl, Klaus" <klaus.berndl@capgemini-sdm.com> writes:
> IMHO tabs should an a frame-basis and each tab should display window-configurations, i.e. switching to a tab X should display exactly the window-layout and contents as X has contained when the user has left it
> And each window of the window-configuration of a tab should contain it's headerline...
>
> Is this understandable?
Sure, but... it may not exactly be what's most convenient for users --
again, it's a hard issue.
While a window-configuration switching implementation is useful in some
cases (e.g. eclipses uses a sort of similar system for switching between
"debugging view" "browsing view" etc), how would the different
configurations get set up ? I can imagine a system that required
explicit user action ("add a new tab with current config"), but...
I think many users might just want to switch between buffers, and have
tabs automatically added for each buffer (perhaps limiting the number
displayed in a MRU fashion, e.g., how eclipse handles source file tabs).
That seems to be more similar to how tabs work in e.g. visual studio,
and other editors...
argh... :]
-miles
--
Suburbia: where they tear out the trees and then name streets after them.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Tabs in Emacs?
2009-11-18 10:19 ` AW: " Berndl, Klaus
@ 2009-11-18 19:08 ` Juri Linkov
0 siblings, 0 replies; 25+ messages in thread
From: Juri Linkov @ 2009-11-18 19:08 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Deniz Dogan, Emacs, Angelo Graziosi, Miles Bader
> Thoughts?
What you describe was implemented in the first prototype of
http://thread.gmane.org/gmane.emacs.devel/93208/focus=94508
that I have later used as the basis of implementing "real" tabs.
In the current implementation, the frame-based tab-bar is located
below the tool-bar. The C part mostly duplicates code from the
non-tookit implementation of the tool-bar. So there already exists
a non-tookit version of the tab-bar that works without crashes.
As for the GTK implementation, I still have unresolved problems.
I'd like to share the current code, so all Emacs developers would
be able to contribute to the development of the GTK part or to
improve code to place the tool-bar and the tab-bar anywhere
in the window tree, etc.
Sending a 4000-line patch to emacs-devel@gnu.org doesn't make sense.
Ideally, I'd like to create a new branch in a dVCS. I regret we still
not switched to bzr where a new branch could be created cheaply.
Any suggestions on how to proceed with the implementation instead
of many years of talking about benefits of this highly useful feature?
(I can't now image how I used Emacs without tabs in a one-frame
configuration.)
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: AW: Tabs in Emacs?
2009-11-18 9:52 ` Miles Bader
2009-11-18 10:19 ` AW: " Berndl, Klaus
@ 2009-11-18 14:56 ` Stefan Monnier
2009-11-18 19:19 ` joakim
1 sibling, 1 reply; 25+ messages in thread
From: Stefan Monnier @ 2009-11-18 14:56 UTC (permalink / raw)
To: Miles Bader; +Cc: Berndl, Klaus, Emacs, Angelo Graziosi, Deniz Dogan
> While a window-configuration switching implementation is useful in some
> cases (e.g. eclipses uses a sort of similar system for switching between
[...]
> I think many users might just want to switch between buffers, and have
> tabs automatically added for each buffer (perhaps limiting the number
> displayed in a MRU fashion, e.g., how eclipse handles source file tabs).
To me it's clear that the C part of the code should offer a "tabs"
widget which the Elisp code can then place anywhere in the window tree.
So you can have it at the root (tabs-fer-frame), or at the leaf
(tabs-per-window), or in-between (for things like ECB maybe).
Stefan
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: AW: Tabs in Emacs?
2009-11-18 14:56 ` AW: AW: " Stefan Monnier
@ 2009-11-18 19:19 ` joakim
0 siblings, 0 replies; 25+ messages in thread
From: joakim @ 2009-11-18 19:19 UTC (permalink / raw)
To: Stefan Monnier
Cc: Berndl, Klaus, Deniz Dogan, Emacs, Angelo Graziosi, Miles Bader
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> While a window-configuration switching implementation is useful in some
>> cases (e.g. eclipses uses a sort of similar system for switching between
> [...]
>> I think many users might just want to switch between buffers, and have
>> tabs automatically added for each buffer (perhaps limiting the number
>> displayed in a MRU fashion, e.g., how eclipse handles source file tabs).
>
> To me it's clear that the C part of the code should offer a "tabs"
> widget which the Elisp code can then place anywhere in the window tree.
> So you can have it at the root (tabs-fer-frame), or at the leaf
> (tabs-per-window), or in-between (for things like ECB maybe).
>
It could presumably already be almost possible with my xwidgets patch.
Ill see if I can put together some demo code.
>
> Stefan
>
--
Joakim Verona
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: Tabs in Emacs?
2009-11-17 13:59 ` AW: " Berndl, Klaus
2009-11-17 14:47 ` Miles Bader
@ 2009-11-17 16:09 ` Jason Rumney
2009-11-18 8:49 ` AW: " Berndl, Klaus
2009-11-18 9:28 ` AW: " Miles Bader
2009-11-17 17:52 ` Juri Linkov
2009-11-17 17:54 ` AW: " David Reitter
3 siblings, 2 replies; 25+ messages in thread
From: Jason Rumney @ 2009-11-17 16:09 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Emacs
Berndl, Klaus wrote:
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g. in Firefox) because the header-line is (mis-)used as tab-title/handle, so when using this mechanism to *simulate* tabs i have no headerline within the tabs... IMHO nothing what i would call "Tabs"...
>
How do you differentiate a "simulated" tab from a "real" tab?
^ permalink raw reply [flat|nested] 25+ messages in thread
* AW: AW: Tabs in Emacs?
2009-11-17 16:09 ` Jason Rumney
@ 2009-11-18 8:49 ` Berndl, Klaus
2009-11-18 9:26 ` Teemu Likonen
2009-11-18 9:28 ` AW: " Miles Bader
1 sibling, 1 reply; 25+ messages in thread
From: Berndl, Klaus @ 2009-11-18 8:49 UTC (permalink / raw)
To: Jason Rumney; +Cc: Emacs
Simulating means, simulating tabs by using the headerline (AFAIK this is how tabbar-mode is implemented, isn't it?)...
Real would mean, there is a headerline available in the tab-window...
Please correct me if i write nonsense...
Klaus
-----Ursprüngliche Nachricht-----
Von: Jason Rumney [mailto:jasonrumney@gmail.com] Im Auftrag von Jason Rumney
Gesendet: Dienstag, 17. November 2009 17:10
An: Berndl, Klaus
Cc: Emacs
Betreff: Re: AW: Tabs in Emacs?
Berndl, Klaus wrote:
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g. in Firefox) because the header-line is (mis-)used as tab-title/handle, so when using this mechanism to *simulate* tabs i have no headerline within the tabs... IMHO nothing what i would call "Tabs"...
>
How do you differentiate a "simulated" tab from a "real" tab?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Tabs in Emacs?
2009-11-18 8:49 ` AW: " Berndl, Klaus
@ 2009-11-18 9:26 ` Teemu Likonen
2009-11-18 9:30 ` Miles Bader
0 siblings, 1 reply; 25+ messages in thread
From: Teemu Likonen @ 2009-11-18 9:26 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Emacs, Jason Rumney
On 2009-11-18 09:49 (+0100), Klaus Berndl wrote:
> Simulating means, simulating tabs by using the headerline (AFAIK this
> is how tabbar-mode is implemented, isn't it?)... Real would mean,
> there is a headerline available in the tab-window...
I think that speaking of functional differences and usage patterns is
more useful in this discussion.
Anyway, previously I used Vim editor and found its tab feature handy and
very intuitive way for maintaining and switching between different
window configurations. With Emacs I use frames but I'd prefer having a
nice tab-like functionality within a single X Window frame. I don't care
if it is called "tabs", but just an intuitive way to switch between
different window configurations would be very useful.
> Please correct me if i write nonsense...
Ending sentences with just one period is enough. :-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: Tabs in Emacs?
2009-11-17 16:09 ` Jason Rumney
2009-11-18 8:49 ` AW: " Berndl, Klaus
@ 2009-11-18 9:28 ` Miles Bader
1 sibling, 0 replies; 25+ messages in thread
From: Miles Bader @ 2009-11-18 9:28 UTC (permalink / raw)
To: Jason Rumney; +Cc: Berndl, Klaus, Emacs
Jason Rumney <jasonr@gnu.org> writes:
> How do you differentiate a "simulated" tab from a "real" tab?
Well among other things, a "simulated" tab-bar steals the header-line
from other uses...
Also I presume the tabbar.el tabs are "per emacs window", and arguably
a per-frame tab-bar would be more like other apps, and that's considered
more "real".
[Though of course that is one of many issues that could go either way ...]
-Miles
--
Faith, n. Belief without evidence in what is told by one who speaks without
knowledge, of things without parallel.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Tabs in Emacs?
2009-11-17 13:59 ` AW: " Berndl, Klaus
2009-11-17 14:47 ` Miles Bader
2009-11-17 16:09 ` Jason Rumney
@ 2009-11-17 17:52 ` Juri Linkov
2009-11-17 17:54 ` AW: " David Reitter
3 siblings, 0 replies; 25+ messages in thread
From: Juri Linkov @ 2009-11-17 17:52 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Angelo Graziosi, Emacs, Deniz Dogan
>>> I would ask if there are plans to add tabs, as many modern applications
>>> have, for Emacs 23.2.
>>
>> There is already e.g. tab bar mode, but it's not part of "core" Emacs today:
>> http://www.emacswiki.org/emacs/TabBarMode
>
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g.
> in Firefox) because the header-line is (mis-)used as tab-title/handle,
> so when using this mechanism to *simulate* tabs i have no headerline
> within the tabs... IMHO nothing what i would call "Tabs"...
The last time I looked at the possibility to implement "real" tabs
in GTK, there was a problem of attaching GtkNotebook to a widget.
It's possible to bind a Gtk tab to a fake widget or to the same
basic frame. This produces a warning, but should basically work
by binding GCallback from a tab to any function that we can use
to implement Emacs-specific tab handling.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: Tabs in Emacs?
2009-11-17 13:59 ` AW: " Berndl, Klaus
` (2 preceding siblings ...)
2009-11-17 17:52 ` Juri Linkov
@ 2009-11-17 17:54 ` David Reitter
2009-11-17 19:15 ` Eli Zaretskii
3 siblings, 1 reply; 25+ messages in thread
From: David Reitter @ 2009-11-17 17:54 UTC (permalink / raw)
To: Berndl, Klaus; +Cc: Angelo Graziosi, Emacs, Deniz Dogan
On Nov 17, 2009, at 8:59 AM, Berndl, Klaus wrote:
> IMHO this tabbar-mode has nothing to do with "real" tabs (as e.g. in Firefox) because the header-line is (mis-)used as tab-title/handle, so when using this mechanism to *simulate* tabs i have no headerline within the tabs... IMHO nothing what i would call "Tabs"...
These are two problems - one conceptual, but the other one an easily solvable technical one.
It wouldn't be tricky to add a second header line (displayed just above the header line) for the purposes of tabbar?
This assumes that tabbar-mode wants to operate on the window level (rather than per-frame), to display a subset of the available buffers for people to switch to in that window. Native widgets for tabs would be the next logical step, but that would require a lot of implementation work for the different toolkits.
The per-frame implementation is very interesting, too, because it would store window configurations. But that's far away from the current tabbar implementation.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: AW: Tabs in Emacs?
2009-11-17 17:54 ` AW: " David Reitter
@ 2009-11-17 19:15 ` Eli Zaretskii
0 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2009-11-17 19:15 UTC (permalink / raw)
To: David Reitter; +Cc: klaus.berndl, deniz.a.m.dogan, emacs-devel, angelo.graziosi
> From: David Reitter <david.reitter@gmail.com>
> Date: Tue, 17 Nov 2009 12:54:17 -0500
> Cc: Angelo Graziosi <angelo.graziosi@alice.it>, Emacs <emacs-devel@gnu.org>,
> Deniz Dogan <deniz.a.m.dogan@gmail.com>
>
> It wouldn't be tricky to add a second header line (displayed just above the header line) for the purposes of tabbar?
I think it might be at least non-trivial. If memory serves, the
current display engine assumes that there's at most one header line in
a window (in exactly the same manner it assumes that there's only one
mode line).
^ permalink raw reply [flat|nested] 25+ messages in thread