all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stephen J. Turnbull'" <stephen@xemacs.org>,
	"'Jan Djärv'" <jan.h.d@swipnet.se>
Cc: 'Stefan Monnier' <monnier@iro.umontreal.ca>,
	"'Emacs Dev \[emacs-devel\]'" <emacs-devel@gnu.org>
Subject: RE: Gtk tabs in emacs, new branch.
Date: Sun, 11 Apr 2010 11:09:18 -0700	[thread overview]
Message-ID: <203268BCBA374E2CA3097FC84362424A@us.oracle.com> (raw)
In-Reply-To: <87tyri429l.fsf@uwakimon.sk.tsukuba.ac.jp>

> Because the tab metaphor involves switching a well-defined area of
> screen from one use to another..., one can trivially subsume
> all uses into "window configuration management".  But the
> implementation of changing what's seen onscreen might involve far more
> than swapping one GUI widget in in place of another, and it might not
> involve swapping GUI widgets at all (where for this purpose I consider
> Emacs windows as widgets).
> 
> In use now?  Probably not, because of the very limited imaginations of
> tab developers (or if you prefer, because of the very limited
> imaginations that tab developers attribute to their users).
> 
> But easy to implement given a flexible tab framework?  Lots of them.
> How about varying font-lock to highlight different aspects of a buffer
> using "layers" of font-lock specs controlled by tabs?  Many others
> that you might classify as "window configuration management", but
> other users might not.  I have in mind switching "projects", which
> might involve piles of behind the scenes machinery such as restoring
> undisplayed buffers in the background, querying status of VCS, etc.

`Amen' to "flexible tab framework". And Stephen gives good examples of
exploiting such generality. My message is in the same vein.

I don't really want to get into this thread much - don't have much to offer,
especially regarding implementation. I'd just suggest the following about what
tabs should be able to _do_, that is, what you should be able to do with them.

I have nothing particular to say now about the questions of where tabs are
(frame, window, subwindows, whatever), how the user interacts with them
(clicking, sorting, whatever), how they should be implemented, etc.

A different and at least equally important question is what happens when a tab
is selected/clicked: what actions are carried out? what does the tab actually do
or control? Emacs gives us the opportunity to do something much more general wrt
tabs than might exist elsewhere.

Other things being equal, we should not forego generality wrt what a tab
selection can do. We should not, for example, decide that tabs should only
switch among window configs or only among buffers or desktops or projects or...
At the least, we should allow a tab to invoke an arbitrary function. That means
at least providing a hook, a handler, or equivalent.

One model that can help guide the design is to allow (but of course not require)
a tab to be associated with an Emacs bookmark. Not just with the buffer
resulting from invoking a bookmark, but with the bookmark itself - that is, with
a particular entry in `bookmark-alist'. Again, I'm not at all suggesting that we
_limit_ tabs to bookmarks but that we allow tabs to access or map to existing
bookmarks. Thinking about bookmarks can help guide the discussion about what
tabs can/should do.

A bookmark is essentially a (persistent) named collection of info. That info
typically includes a destination, which is typically a file location and a
position within the file. But although that is typical, a bookmark need not be
associated with any destination.

A bookmark can record state of any kind (persistently), and invoking a bookmark
can restore that state, without necessarily "going to" any destination. The
state restored might be entirely invisible, for example.

Stephen's example of switching among projects, thus restoring project state, is
something that you can do using bookmarks. In my library bookmark+.el[*] for
example, there are Desktop bookmarks, Dired bookmarks that restore markings and
hidden-subdirs state, del.icio.us-style tags, and other ways to represent and
switch among things such as "projects". And more and better such could easily be
imagined. (I'm looking forward to restoring window configs once we have their
serialization.)

But jumping to a bookmark need not even restore anything. "Jumping" can do
anything you want it to. A bookmark can include a handler, which is pretty much
an arbitrary function that is invoked during "jumping". Users can easily define
their own types of bookmarks (e.g. with their own handlers). Bookmark+ offers
several examples of additional kinds of bookmarks and out-of-the-ordinary
bookmark handling, to give you an idea.

The bookmarking and bookmark-jumping mechanisms are very general and are
available for any possible kind of bookmark - which means pretty much any
(persistent) named collection of info.

Being able to have a tab represent (map to) a bookmark would be very useful,
IMO. By "represent" I mean just that a tab could have as its name a bookmark
name, and clicking (selecting) the tab would invoke ("jump" to) the bookmark.
IOW, the tab would just be a shortcut for a jump call, the same way that an
entry in the *Bookmark List* buffer (`C-x r l') is such a shortcut.

Look at it also from another point of view. In bookmark+ (for example), you can
hide or show (in the *Bookmark List*) the bookmarks that satisfy certain
properties. You can mark bookmarks and then perform operations on them (as in
Dired or Buffer Menu). You can sort the bookmarks that are visible. And so on.

I'd like to be able to do the same kinds of things with tabs: hide tabs based on
certain criteria, mark tabs, act on the marked tabs (or on all tabs), sort the
tabs in a given tab bar, etc. And that includes opening/showing a set of tabs
that satisfy some property (whether or not they were shown previously and then
hidden). For example, be able to hit a key to open/add (or close/hide) all tabs
belonging to a given project.

Whatever choices are made for implementing tabs in Emacs, I'd hope that they
could trivially be made to accommodate this suggestion (using bookmarks) - among
other uses. I mention the example of bookmarks to underline what Stephen T. and
others have said wrt letting tabs be general and not forcing them to map only to
certain things such as window configurations. Bookmarks serve as a good example,
as food for thought.

And the fact that bookmarks already offer so many possibilities of switching and
restoring state points out an important point: We need not build such
functionality into the tabs (design) themselves. We should just _allow_ tabs to
leverage other features of Emacs that provide such functionality.

It would be a mistake to try to decide the behavior of tabs - what they _do_ in
some narrow way. We should define the GUI behavior (user interaction) and design
ways to invoke Emacs functions or objects such as bookmarks, but we should not
otherwise define what tabs actually do when you click them, beyond invoking some
arbitrary (Emacs-Lisp) thingy.

In general, I suggest that we look to things like bookmarks for examples of the
kinds of things we might want to be able to do with tabs. That will help us
avoid limiting the design of Emacs tabs unnecessarily. When looking for models
on which to base our design, we should think of other thingies in Emacs (such as
bookmarks), and not just think of other uses of tabs in existing applications.

Yes, we do want to be able to do with Emacs tabs _at least_ the kinds of things
you can do with Eclipse tabs or Firefox tabs. But let's not limit our design
thinking to what you can do with tabs in other apps.

Dunno whether I was clear, and apologies for rambling a bit. The point is to
keep what tabs _do_ very general, regardless of how they're implemented or what
the user/GUI interaction will be like. And thinking of what bookmarks can do is
not a bad model for such generality. Being able to use existing bookmarks via
tabs would be one example of exploiting the generality that I hope tabs will
have.

[* http://www.emacswiki.org/emacs/BookmarkPlus]






  reply	other threads:[~2010-04-11 18:09 UTC|newest]

Thread overview: 154+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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.

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=203268BCBA374E2CA3097FC84362424A@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    --cc=monnier@iro.umontreal.ca \
    --cc=stephen@xemacs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.