All below setup can customize by: M-x customize-group RET sr-speedbar RET
‘sr-speedbar’window width under WINDOW system.
‘sr-speedbar’window width under CONSOLE.
‘sr-speedbar’window when use command
‘other-window’select window in cyclic ordering of windows.
A bug/problem found: speedbar’s frame doesn’t react on window resize. It may become wider/narrower depending on when it was opened (small window resize to big window → it becomes wider, big window resize to small window → becomes narrow). Re-opening speedbar fixes the problem. Emacs 23.1.
Setting the width doesn’t appear to work (Emacs 23.1, Ubuntu 8.10).
In Emacs 23.3 and 24 it works, but in 24 a new problem appear, when clicking a file in speedbar it allways open a split window, it should use the same window one was previously editing in the same frame. – AlvaroMartinez
Setting pop-up-windows to nil fixed this problem for me. See http://www.gnu.org/s/emacs/manual/html_node/elisp/Displaying-Buffers.html. – Ben Booth
Please report an Emacs bug:
‘M-x report-emacs-bug’. They’ve made lots of changes to the code affecting windows. They would no doubt like to know about this problem. – DrewAdams
A few problems. First, this is being tested on GNU Emacs 220.127.116.11 (i386-mingw-nt5.1.2600).
Hard to know if this routine is being actively supported. Your mileage may vary.
A few addendums. Not showing the files is due to the fundamental speedbar setting for showing files it does not know about. Once that is set, it will show other files when navigating directories. However, a few bugs remain
Further further addendums. I might need to clean this up a bit.
How can I disable the icons? I only want ASCII, even in GUI Emacs.
(setq speedbar-use-images nil)
– Charles Strahan
Can I set the default font size for just the sr-speedbar buffer to something other than my other buffers/windows? I tried setting default-frame-alist as suggested by the speedbar-article, but that just caused all my frames to change font size whenever speedbar spawns. It wold be nice if sr-speedbar could default to a small font so that I can get a better overview over large code bases easily.
To answer my own question, I read the wikipage on FacesPerBuffer and came up with this:
(make-face 'speedbar-face) (set-face-font 'speedbar-face "Inconsolata-12") (setq speedbar-mode-hook '(lambda () (buffer-face-set 'speedbar-face)))
which solved my problem.
Even with (setq sr-speedbar-skip-other-window-p t) in .emacs file, the behavior of delete-other-windows is still weird in current version of sr-speedbar.el. In detail, suppose 2 windows opened, in either of them ^ X 1, there is still chance to select the SPEEDBAR window to be active, which is not usually the user want – the user want the original window be selected. After some experiment, I come up with following elisp code to further advice delete-other-windows not to select the SPEEDBAR window.
(defadvice delete-other-windows (after my-sr-speedbar-delete-other-window-advice activate) "Check whether we are in speedbar, if it is, jump to next window." (let () (when (and (sr-speedbar-window-exist-p sr-speedbar-window) (eq sr-speedbar-window (selected-window))) (other-window 1) ))) (ad-enable-advice 'delete-other-windows 'after 'my-sr-speedbar-delete-other-window-advice) (ad-activate 'delete-other-windows)
just place them after the elisp lines you use to load sr-speedbar.
How to keep speed bar window width after resizing?
(with-current-buffer sr-speedbar-buffer-name (setq window-size-fixed 'width))
to your .emacs after calling
â Chen Xian’an
How to integrate sr-speedbar with ERC’s erc-speedbar-browser?
There is a bug when using multiple frames
C-x 5 2
C-x 5 o (I’m in origial frame with speedbar)
C-x 5 o (I’m in 2nd frame without speedbar)
Now when I page up and page down it also moves the first frame.
I don’t get this when using regular speedbar. It seems like multiple sr-speedbars would be desired (one for each window).