Fork me on GitHub

sr-speedbar - "0.1.8"

what is it? download sr-speedbar

Same frame speedbar

by Sebastian Rose <sebastian_rose@gmx.de>

http://www.emacswiki.org/emacs/download/sr-speedbar.el

how to install

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

about

The sr-speedbar.el was created just because I could not believe what I
read on http://www.emacswiki.org/cgi-bin/wiki/Speedbar.  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! ;)


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-toggle)

... or any key binding you like.


Customize:

`sr-speedbar-width-x'
The `sr-speedbar' window width under WINDOW system.
`sr-speedbar-width-console'
The `sr-speedbar' window width under CONSOLE.
`sr-speedbar-max-width'
The max window width allowed remember.
`sr-speedbar-delete-windows'
Whether delete other window before showing up.
`sr-speedbar-skip-other-window-p'
Whether skip `sr-speedbar' window when use
command `other-window' select window in cyclic ordering of windows.
`sr-speedbar-auto-refresh'
Control status of refresh speedbar content.
`sr-speedbar-right-side'
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
`sr-speedbar-dedicated-match-protected-window-p'.

* 04 Jan 2009:
* Andy Stewart:
* Add new option `sr-speedbar-auto-refresh' control refresh content.
* Add new functions:
`sr-speedbar-refresh-turn-on',
`sr-speedbar-refresh-turn-off',
`sr-speedbar-refresh-toggle'.
* 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
`sr-speedbar-max-width'.
* Add new variable `delete-protected-window-list', for protected
special window don't deleted.
This variable is common for any extension that use dedicated
window.
* 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
`sr-speedbar-window-exist-p'.
* 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.


Acknowledgements:

All emacsers ... :)


Bug



TODO




Require