When navigating a source file with incremental search, I often find myself jumping into some context that is taller than the window. This raises the question: "Which class am I in?". Or, if the previous developer is prone to writing tall methods: "Which class and method am I in?"
I currently answer these questions by interrupting my search to start a new regex search in the reverse direction, then cancel this search with C g
, then do whatever (usually resume the search). But, this happens to me so often, I feel like I should have a single command to just print the class/method context in the minibuffer. Or, even better, if that context was always visible. (I would give up a line of window for that.)
Is there some Emacs gadget that already scratches this itch? Or, am I just going about this in completely the wrong way? If it matters, I happen to be working in Python and Java.