help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speedbar


From: Emanuel Berg
Subject: Re: speedbar
Date: Tue, 16 Feb 2016 02:02:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

rjd <3246251196ryan@gmail.com> writes:

> Can I customize sr-speedbar such that when I open
> a file in the tree the newly opened buffer
> becomes active.
>
> Since I run a hook function that relies on
> buffer-file-name and the active buffer remains in
> the sr-speedbar window, then buffer-file-name is
> nil. What I want is the new buffer to be active so
> the hook will function correctly.
>
> Unless there is a variable that sr-speedbar uses to
> store the path of the selected file, then I guess
> I could use that.

I don't use sr-speedbar but yes, it should come with
that, otherwise it is bad. Make a search with
`apropos' and perhaps `apropos-value' (with the buffer
name as the value).

If it isn't there you could ask the speedbar people
where it is.

As a last effort you can fetch the data which
I suppose is found in the speedbar buffer -
`thing-at-point' - and reconstruct the complete data
that way.

But I'd consider that a secondary plan because those
operations are always error-prone. They are considered
hacks, probably for good reasons. The only case when
they are the exact right thing to do is when they
work flawlessly!

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]