From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.devel Subject: Re: Tabs are ready? -> Let us give a definition of tabs. Date: Thu, 9 Feb 2012 07:55:47 -0800 Message-ID: References: <4F2E5D33.6020406@gmx.at> <4F2E8185.4080706@gmx.at> <4F2EC768.4050603@gmx.at> <4F2FAD31.9040702@gmx.at> <877h00yq7z.fsf@uwakimon.sk.tsukuba.ac.jp> <871uq7zw5c.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04428854a4a5ee04b88a0b76 X-Trace: dough.gmane.org 1328802970 21518 80.91.229.3 (9 Feb 2012 15:56:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2012 15:56:10 +0000 (UTC) Cc: Juri Linkov , martin rudalics , "Stephen J. Turnbull" , Emacs Dev To: Alin Soare Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 16:56:08 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvWLv-0007XI-Jh for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 16:56:07 +0100 Original-Received: from localhost ([::1]:57398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvWLs-0008Es-8v for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 10:56:04 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvWLk-0008Eg-Iq for emacs-devel@gnu.org; Thu, 09 Feb 2012 10:56:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvWLd-0005uP-5J for emacs-devel@gnu.org; Thu, 09 Feb 2012 10:55:56 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:50641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvWLc-0005u4-Ss for emacs-devel@gnu.org; Thu, 09 Feb 2012 10:55:49 -0500 Original-Received: by wgbdt13 with SMTP id dt13so1370509wgb.30 for ; Thu, 09 Feb 2012 07:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vlcc3eGDjZV/AQvm3wyCRe0L8fToNRrq5GNZzpyZT0g=; b=EoOHu+Oe6lR/kx8/m51Ere7XAU90pNZdLbRkZ1y5lEYfbpElxQ3c5OMrV9yKcsGF2l zFTfggZ1w3BfVIwr7RIlbaFZf1B0hNMkRAsk2BhQeezFncLVKVGODU1P0H4ZdRGyUWby OxBDIEF/hyoB2PIbfsiGhQ7hYNwsuyDVZWMzM= Original-Received: by 10.180.83.70 with SMTP id o6mr22462712wiy.19.1328802947179; Thu, 09 Feb 2012 07:55:47 -0800 (PST) Original-Received: by 10.223.102.133 with HTTP; Thu, 9 Feb 2012 07:55:47 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148404 Archived-At: --f46d04428854a4a5ee04b88a0b76 Content-Type: text/plain; charset=ISO-8859-1 On Monday, February 6, 2012, Alin Soare wrote: >> But this does not require all of the junk (events, callbacks, etc) >> that you've talked about. All that *needs* to be added to Emacs is >> the very limited API needed to associate tabs with a window or frame, >> displayable content and a label with each tab, and to query that >> information. The rest can be implemented with existing Emacs Lisp >> facilities, such as faces (to change the color of a tab) and process >> sentinels (one sort of event callback). If you want a GTK-like API, >> that should be easy to write in Lisp. >> > > Without events, do you have a concrete idea how to signal to a hidden tab that something changed , such that it changes the color? > I do not need a very limited API. I need a programmable tab bar. I would give the tab a "wants attention" flag that gets unset when the tab is activated, and set when `(tab-request-attention TAB)' is called, e.g. by a process sentinal. Then the tab's title would switch from `tab-inactive-face' to `tab-wants-attention-face'. The way I'm picturing it, the tab's internal state consists of four pieces of data: a title, a window (or possibly window configuration), a function that's called when it becomes active, and another function that's called when it becomes inactive. That *seems* like it's meeting all your requirements, as I've understood them. -- -PJ Gehm's Corrollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. --f46d04428854a4a5ee04b88a0b76 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Monday, February 6, 2012, Alin Soare <as1789@gmail.com> wrote:

>> But this does not requ= ire all of the junk (events, callbacks, etc)
>> that you've ta= lked about. =A0All that *needs* to be added to Emacs is
>> the very limited API needed to associate tabs with a window or fra= me,
>> displayable content and a label with each tab, and to query= that
>> information. =A0The rest can be implemented with existing= Emacs Lisp
>> facilities, such as faces (to change the color of a tab) and proce= ss
>> sentinels (one sort of event callback). =A0If you want a GTK= -like API,
>> that should be easy to write in Lisp.
>> >
> Without events, do you have a concrete idea how to signal to a= hidden tab that something changed , such that it changes the color? =A0=A0=
> I do not need a very limited API. I need a programmable tab bar.
I would give the tab a "wants attention" flag that gets unset= when the tab is activated, and set when `(tab-request-attention TAB)' = is called, e.g. by a process sentinal. =A0Then the tab's title would sw= itch from `tab-inactive-face' to `tab-wants-attention-face'.

The way I'm picturing it, the tab's internal state consists of = four pieces of data: a title, a window (or possibly window configuration), = a function that's called when it becomes active, and another function t= hat's called when it becomes inactive. =A0That *seems* like it's me= eting all your requirements, as I've understood them.

--

-PJ

Gehm's Corrollary to Clark's Law: Any tec= hnology distinguishable from
magic is insufficiently advanced.
--f46d04428854a4a5ee04b88a0b76--