Fork me on GitHub

sr-speedbar - "0.1.8"

what is it? download sr-speedbar

Same frame speedbar

by Sebastian Rose <>

how to install

M-x package-install [RET] sr-speedbar [RET]


The sr-speedbar.el was created just because I could not believe what I
read on  They wrote there
that it is not possible to show the speedbar in the same frame.  But, as
we all know, ecb had this already.  So I started as some kind of joke :)
But when I found it useful and use it all the time.

Now you type windows key with 's' (`s-s' in Emacs) will show the speedbar
in an extra window, same frame.  You can customize the initial width of the
speedbar window further down for console/DOS and X/Win/MacOS separately.

Below are commands you can use:

`sr-speedbar-open'                   Open `sr-speedbar' window.
`sr-speedbar-close'                  Close `sr-speedbar' window.
`sr-speedbar-toggle'                 Toggle `sr-speedbar' window.
`sr-speedbar-select-window'          Select `sr-speedbar' window.
`sr-speedbar-refresh-turn-on'        Turn on refresh speedbar content.
`sr-speedbar-refresh-turn-off'       Turn off refresh speedbar content.
`sr-speedbar-refresh-toggle'         Toggle refresh speedbar content.

Enjoy! ;)


Copy sr-speedbar.el to your load-path and add to your ~/.emacs

(require 'sr-speedbar)
(global-set-key (kbd "s-s") 'sr-speedbar-toggle)

... or any key binding you like.


The `sr-speedbar' window width under WINDOW system.
The `sr-speedbar' window width under CONSOLE.
The max window width allowed remember.
Whether delete other window before showing up.
Whether skip `sr-speedbar' window when use
command `other-window' select window in cyclic ordering of windows.
Control status of refresh speedbar content.
Puts the speedbar on the right side if non-nil (else left).

All above setup can customize by:
M-x customize-group RET sr-speedbar RET

Change log:

* 20 July 2009:
* Peter Lunicks:
* Add new option `sr-speedbar-right-side' to control which
side of the frame the speedbar appears on.

* 18 Feb 2009:
* Andy Stewart:
* Fix bug between ECB and `sr-speedbar-close'.

* 29 Jan 2009:
* Andy Stewart:
* Fix doc.

* 13 Jan 2009:
* Andy Stewart:
* Use `emacs-major-version' instead comment for Emacs 21 compatibility.
* Rewrite advice for `pop-to-buffer' to avoid `pop-to-buffer' not effect
when have many dedicated window in current frame.
* Rewrite advice for `delete-other-windows' to avoid use common variable
`delete-protected-window-list' and use `window-dedicated-p' instead.
Remove variable `delete-protected-window-list' and function

* 04 Jan 2009:
* Andy Stewart:
* Add new option `sr-speedbar-auto-refresh' control refresh content.
* Add new functions:
* Fix doc.

* 30 Dec 2008:
* Andy Stewart:
* Rewrite advice for `delete-other-windows' for fix the bug
with window configuration save and revert.
* Rewrite advice for `delete-window', now just remember window
width before deleted, and can use `delete-window' do same effect
as command `sr-speedbar-close'.
* Add new option `sr-speedbar-max-width'.
Remember window width before hide, except larger than value of
* Add new variable `delete-protected-window-list', for protected
special window don't deleted.
This variable is common for any extension that use dedicated
* Fix doc.

* 29 Dec 2008:
* Andy Stewart:
* Pick-up and refactory code that use `buffer-live-p' or `window-live-p',
and replace with `sr-speedbar-buffer-exist-p' and
* Rename some function with prefix `sr-speedbar-' to avoid
conflict with other functions.
* Pick-up the code that handle advice for `other-window',
and replace with function `sr-speedbar-handle-other-window-advice'.
* Clean up code, make more clear.

* 21 Dec 2008:
* Andy Stewart:
* Fix the bug `sr-speedbar-open' and `sr-speedbar-close'.
* Fix doc.

* 20 Dec 2008
* Andy Stewart:
* Fix `ad-advised-definition-p' error.
* Fix doc.

* 17 Dec 2008
* Andy Stewart:
* Add new option `sr-speedbar-skip-other-window-p' and new advice
for `other-window', make user skip select `sr-speedbar' window
when use command `other-window'.
* Fix the name of advice, make more clear.
* Fix the bug `sr-speedbar-select-window' when no live window exist.
* Fix doc.

* 16 Dec 2008:
* Andy Stewart:
* Fix the bug of `sr-speedbar-refresh', use `default-directory'
get refresh directory instead through function in `dired'.
* Fix `window-live-p' bug, check window valid value before use
`window-live-p' test `sr-speedbar-window'.
* Fix `buffer-live-p' bug, check buffer valid value before use
`buffer-live-p' test `speedbar-buffer'.
* Add advice `pop-to-buffer' to make function `display-buffer'
can pop-up window when just have two windows (one is `sr-speedbar'
window) in current frame.
* Add group `sr-speedbar'.
More better customize interface through `customize-group'.

* 28 Sep 2008:
* Andy Stewart:
* Fix a bug, when `sr-speedbar-toggle' many times, window width
will increment automatically.
* Use around advices replace, make code simple.
* Use `sr-speedbar-open' replace `sr-speedbar-no-separate-frame'.
* Clean up code.

* 28 Sep 2008:
* Sebastian:
* set `sr-speedbar-delete-windows' to nil to avoid
the removal of other windows.

* 26 Jun 2008:
* Sebastain:
* Added Andy Stewart's patch to refresh the speedbar's contents.
Thanks for this one!

* Init:
* Sebastian:
* Added some lines to get it working:
* splitting the window and remember it,
* changing the way speedbar finds a file.
* File view of speedbar is now working all right.
* C-x 1 in other window deletes speedbar-window, just calling
M-x sr-speedbar-no-separate-frame again is fine now.
* Toggle speedbar works, width is save when toggling.
* Recalc speedbar width if window-width - speedbar-width &lt;= 0
* Speedbar window is now dedicated to speedbar-buffer.


All emacsers ... :)