From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: richardeng Newsgroups: gmane.emacs.devel Subject: Re: Integrate sr-speedbar.el with speedbar.el Date: Sun, 21 Dec 2008 12:27:56 +0800 Message-ID: <494DC5CC.7040608@foxmail.com> References: <87abasw1wk.fsf@debian.domain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229833715 15902 80.91.229.12 (21 Dec 2008 04:28:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Dec 2008 04:28:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andy Stewart Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 21 05:29:42 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 1LEFwj-0004dx-W1 for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2008 05:29:42 +0100 Original-Received: from localhost ([127.0.0.1]:52599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEFvX-0001zy-3Z for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 23:28:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEFvS-0001yY-TK for emacs-devel@gnu.org; Sat, 20 Dec 2008 23:28:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEFvP-0001uf-Jc for emacs-devel@gnu.org; Sat, 20 Dec 2008 23:28:21 -0500 Original-Received: from [199.232.76.173] (port=48944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEFvP-0001uY-Hx for emacs-devel@gnu.org; Sat, 20 Dec 2008 23:28:19 -0500 Original-Received: from smtpbg3.foxmail.com ([121.14.102.33]:42852) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LEFvO-00087W-Q0 for emacs-devel@gnu.org; Sat, 20 Dec 2008 23:28:19 -0500 Original-Received: from 172.23.147.140 (foxmail.com [172.23.147.140]) by smtpbg3 (foxmail.com) with SMTP id XTDcroir; Sun, 21 Dec 2008 12:27:57 +0800 (envelope-from richardeng@foxmail.com) X-QQ-mid: esmtp5122983367717318620 Original-Received: from [192.168.1.202] (unknown [116.225.241.141]) by smtp.foxmail.com (Postfix) with ESMTP id ; Sun, 21 Dec 2008 12:27:56 +0800 (CST) User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) In-Reply-To: <87abasw1wk.fsf@debian.domain> 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:107154 Archived-At: 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"