I love using speedbar (specificall I use sr-speedbar) but I'm having a hard time configuring it to my liking. One thing I'd like to be able to do, is set it so that there's an "anchor" directory, such that even if I open its subdirectories or files, the speedbar should always show me the view from that directory, rather than from the level I'm currently at.
Let me explain: currently if I'm in directory "usr" and (within speedbar) I open the subdirectory "my-name" and then the file "something.txt", the speedbar will update its view so that the top line is "path/to/usr/my-name" and it shows the contents of the "my-name" folder. But what if I want to stay at the top-level view, so that the top line is still just "path/to/usr/" and speedbar just shows me the opened directory "my-name" with its contents, as well as the other contents of "usr"?
I hope my explanation makes sense. I've been having a hard time trying to verbalize this so I haven't had much luck searching for a solution on the web, and I've been poking around at the source code but couldn't clearly figure out what mechanism speedbar uses to update its view.
Please feel free to offer some pointers or full solutions. Ideally I'm looking for some simple elisp code that could do the job, and not a full package to add to my config (as it seems like it'd be a simple enough change). Thanks in advace!
SPC
spacebar key, bound tospeedbar-toggle-line-expansion
?