From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "alin.s" Newsgroups: gmane.emacs.devel Subject: Re: Gtk tabs in emacs, new branch. Date: Fri, 9 Apr 2010 00:23:40 -0700 (PDT) Message-ID: <28188551.post@talk.nabble.com> References: <4BB49A8F.3000307@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270797970 24158 80.91.229.12 (9 Apr 2010 07:26:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2010 07:26:10 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 09 09:26:08 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O08bP-0000ao-Rw for ged-emacs-devel@m.gmane.org; Fri, 09 Apr 2010 09:26:08 +0200 Original-Received: from localhost ([127.0.0.1]:56167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O08bP-0002HJ-2j for ged-emacs-devel@m.gmane.org; Fri, 09 Apr 2010 03:26:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O08Z7-0001Qt-Kg for emacs-devel@gnu.org; Fri, 09 Apr 2010 03:23:45 -0400 Original-Received: from [140.186.70.92] (port=51738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O08Z5-0001PX-S9 for Emacs-devel@gnu.org; Fri, 09 Apr 2010 03:23:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O08Z3-0005rI-M2 for Emacs-devel@gnu.org; Fri, 09 Apr 2010 03:23:43 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:58064) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O08Z3-0005rC-D2 for Emacs-devel@gnu.org; Fri, 09 Apr 2010 03:23:41 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1O08Z2-0003HY-3w for Emacs-devel@gnu.org; Fri, 09 Apr 2010 00:23:40 -0700 In-Reply-To: <4BB49A8F.3000307@swipnet.se> X-Nabble-From: alinsoar@voila.fr X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123379 Archived-At: Jan Dj=C3=A4rv wrote: >=20 > Hello. >=20 > I've published a new branch (I hope, it is the first time I do this) that > adds=20 > Gtk+ tabs to Emacs, it is at bzr.savannah.gnu.org/srv/bzr/emacs/gtk-tabs. >=20 > Tabs isn't visible internally, it looks like just one frame at the lisp > level.=20 > Window configurations are used when switching between tabs. I think > this=20 > may cause flicker on slower machines. Making Emacs use Gtk+ double > buffering=20 > here would help. I may violate running Lisp from C restrictions here, bu= t > I=20 > am not sure. Tabs most likely introduces new frame sizing errors. >=20 > The TODO file talks about tabs on each window. To make this happen, at > least=20 > for Gtk+, each window needs to be its own widget, instead of one widget > per=20 > frame as we have now. This is a bigger task. >=20 > 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. >=20 > The tabs themselves should be smaller IMHO, but the x to delete a tab > makes=20 > them larger than the text. >=20 > Lisp code is in native-tabs.el. Keybindings are: >=20 > (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))) >=20 >=20 > The lisp interface is: >=20 > (find-file-new-tab (filename &optional wildcards) >=20 > Edit file FILENAME, in a new tab. >=20 > (tab-new &optional LABEL FRAME) >=20 > 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. >=20 > Returns the key for the tab, which can be passed to `tab-delete'. >=20 > (tab-delete &optional KEY FRAME) >=20 > 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. >=20 > (tab-delete-other &optional FRAME) >=20 > Remove all tabs from frame FRAME except the current one. > FRAME nil means use the selected frame. >=20 > (tab-set-label LABEL &optional FRAME) >=20 > 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. >=20 > (tab-next &optional FRAME) >=20 > 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. >=20 > (tab-previous &optional FRAME) >=20 > 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. >=20 > I'm sure there are tons of bugs. I have not compiled this tree for > anything=20 > other than Gtk+. >=20 > =09Jan D. >=20 >=20 > =20 >=20 Hi, I worked on tabs, and after I did something general at C level, I realised that I could have done better. Unfortunately, for now I cannot continue to work on that, but I can do in in about 6 months. I can do the interface at = C level. For me a tab will be neither a window configuration, nor a frame, but it will act according to an initialization function written in lisp. Every event will have associated a script, like switch, etc. It is useful also fo= r me to insert an environment of tab-local variables. In this manner, I could do it in 6 months for all. If you work on tabs and install a definitive version, please tell me whethe= r it makes sense for me to implement my version in future, when I have time. Alin --=20 View this message in context: http://old.nabble.com/Gtk-tabs-in-emacs%2C-ne= w-branch.-tp28108550p28188551.html Sent from the Emacs - Dev mailing list archive at Nabble.com.