Gtk tabs in emacs, new branch.

From: Jan Djärv Subject: Gtk tabs in emacs, new branch. Date: Thu, 01 Apr 2010 15:07:27 +0200 User-agent: Thunderbird 2.0.0.24 (X11/20100317)

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.

reply via email to

