2

In Emacs, can you get something like the following:

10 |int foo() {
11 |    int a = bar();
12 | 30 |int bar() {
13 | 31 |    return 10; 
14 | 32 |}
15 | // Bar.h
// Foo.c

The idea is that instead of going to the definition, the definition is spliced in at the point. This would be very similar to the "Peek definition" feature in Visual Studio 2017.

Is it even possible to "layer" a buffer on top of another buffer like this? Further, is it possible to get viewport-style scrolling inside the "top layer" buffer (like an ordinary buffer)? If it is possible to do so, please attach a screenshot of the result in your answer.

I've tried searching for related terms but I've only bumped into (a) indirect buffers -- these don't seem to be what I'm looking for and (b) overlays -- these seem to be modifying the view of the current buffer, not putting in a new buffer.

To be clear, I don't want to open another pane by splitting the window; I know that is already possible today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.