From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: Integrate sr-speedbar.el with speedbar.el Date: Sun, 21 Dec 2008 07:42:28 +0100 Message-ID: <87vdtekp0r.fsf@tux.homenetwork> References: <87abasw1wk.fsf@debian.domain> <494DC5CC.7040608@foxmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229842105 30149 80.91.229.12 (21 Dec 2008 06:48:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Dec 2008 06:48:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 21 07:49:32 2008 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.50) id 1LEI83-0001t0-5D for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2008 07:49:31 +0100 Original-Received: from localhost ([127.0.0.1]:47194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEI6q-0004ZX-O1 for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2008 01:48:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEI6k-0004XI-Sr for emacs-devel@gnu.org; Sun, 21 Dec 2008 01:48:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEI6i-0004V7-Fn for emacs-devel@gnu.org; Sun, 21 Dec 2008 01:48:10 -0500 Original-Received: from [199.232.76.173] (port=46054 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEI6h-0004UR-QX for emacs-devel@gnu.org; Sun, 21 Dec 2008 01:48:07 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:39370 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEI6h-0005vT-3M for emacs-devel@gnu.org; Sun, 21 Dec 2008 01:48:07 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LEI6e-00040C-OQ for emacs-devel@gnu.org; Sun, 21 Dec 2008 06:48:04 +0000 Original-Received: from 72.211.85-79.rev.gaoland.net ([79.85.211.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Dec 2008 06:48:04 +0000 Original-Received: from thierry.volpiatto by 72.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Dec 2008 06:48:04 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 92 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 72.211.85-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:km0cqIl8E0SdUpgvU+7/SORmHg8= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:107157 Archived-At: richardeng writes: > Andy Stewart wrote: >> Hi all, >> >> Speedbar is very useful for file browser or other programming. >> But this have a big problem is, speedbar is show in other frame. >> So need switch between two frame, not very convenient. >> >> And have a exist extension sr-speedbar.el (write by "Sebastian Rose") >> can make speedbar show in same frame. >> >> Find it at: http://www.emacswiki.org/emacs/download/sr-speedbar.el >> >> I'm another developer of sr-speedbar. >> I have attached newest version of sr-speedbar. >> >> I want to integrate sr-speedbar with speedbar. >> "Sebastian Rose" and me were sign copyright of FSF. >> >> Any suggestion? >> >> -- Andy >> >> > I love this feature, it's useful in console. > > > Bug 1: eval (sr-speedbar-close) twice, then (sr-speedbar-open) got > following error: > Window width 0 too small (after splitting) > > So, check sr-speedbar before real closing: ----------------------- > diff -c /tmp/sr-speedbar.el\~ /tmp/sr-speedbar.el > --- /tmp/sr-speedbar.el~ 2008-11-06 07:57:08.000000000 -0800 > +++ /tmp/sr-speedbar.el 2008-11-06 07:59:21.000000000 -0800 > @@ -270,16 +270,17 @@ > (interactive) > (let ((current-window (selected-window))) > (if (and sr-speedbar-window > - speedbar-buffer > - (window-live-p sr-speedbar-window) ;when > sr-speedbar-window' visible - > (buffer-live-p speedbar-buffer)) ;and contain `speedbar-buffer' > - (sr-speedbar-select-window) > - (if (> (current-window-take-width) 1) ;if width of > sr-speedbar-window' is a valid value - (setq > sr-speedbar-width (current-window-take-width))) ;remember it make next > restore same width - (bury-buffer) > - (if (and current-window > - (window-live-p current-window)) > - (select-window current-window))))) > + speedbar-buffer > + (window-live-p sr-speedbar-window) ;when > sr-speedbar-window' visible + > (buffer-live-p speedbar-buffer)) ;and contain `speedbar-buffer' > + (progn > + (sr-speedbar-select-window) > + (if (> (current-window-take-width) 1) ;if width of > sr-speedbar-window' is a valid value + (setq > sr-speedbar-width (current-window-take-width))) ;remember it make next > restore same width + (bury-buffer) > + (if (and current-window > + (window-live-p current-window)) > + (select-window current-window)))))) > > Bug > 2: trivial bug > ;;; Installation: > ;; > ;; Copy sr-speedbar.el to your load-path and add to your ~/.emacs > ;; > ;; (require 'sr-speedbar) > ;; (global-set-key (kbd "s-s") 'sr-speedbar-togge) > // --> toggle > ;; > ;; ... or any key binding you like. > > > > Bug 3: (speedbar) then (sr-speedbar-open) report error "Wrong type argument: stringp, nil" This seem to fix this bug here: ,---- | (defalias 'speedbar 'sr-speedbar-toggle) `---- -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France