Run emacs sr-speedbar in buffers at boot mode

I am using sr-speedbar in emacs. When loaded, it runs in file mode. Then I manually change it to buffer mode. Since I almost always use buffer mode, I would prefer to start it there. However, I can't find any way after googling and wondering if anyone has a Lisp expert on how to solve this problem.

+3


source to share


2 answers


The variable speedbar-initial-expansion-list-name

controls the initial presentation of the speed panel. Default value "files"

. The other two possibilities are: "quick buffers"

or "buffers"

- one of the following can be placed in the .emacs

file after a (require 'speedbar)

:

(setq speedbar-initial-expansion-list-name "quick buffers")

      



or

(setq speedbar-initial-expansion-list-name "buffers")

      

+3


source


sr-speedbar is a package built around a speed bar, so you need to tweak the speed setting yourself as well. There is no existing customization option for what you want, but you can implement yourself using Hook in your case speedbar-mode-hook

.

The following should do what you want



(add-hook 'speedbar-mode-hook
          (lambda ()
            (speedbar-change-initial-expansion-list "quick buffers")))

      

I'll copy it from fooobar.com/questions/2096300 / ... and I've tested it using both speedbar and sr-speedbar.

+1


source







All Articles