73

I know how to go to a variable definition in Emacs using semantic-mode. It works well in a single file (I think it doesn't work if the definition is in another file). Using C-c , j, I can go to the definition of the variable, but, how do I jump back to the previous line? Currently I use display Symref C-c , g, and select the displayed symref.

Is there any straight method?

1 Answer 1

129

Use:

C-u C-space or C-u C-@

If you want to navigate back between buffers, you can use:

C-x C-space or C-x C-@

This makes Emacs jump to the mark (and set the mark from position popped off the local mark ring) which has usually been set by a previous jump command.

Sign up to request clarification or add additional context in comments.

10 Comments

nice Thomas! That's working as expected :). Hm, being not able to go to another buffer, is not quite a problem. because Semantic-Mode can not also open definition to another file/buffer. Or, can it?
I don't know about semantic-mode, but in any case C-u C-@ would not take you back to the original buffer.
@Thomas It's been a couple of months since you asked this so it might be a new feature, but yes, semantic can find definitions in other buffers/files and jump to them. When that happens just go back to previous buffer C-x b RET, and the point should still be where you left it.
By the way, C-x C-space (instead of C-u) jumps to the global mark, which works even across buffers.
@nephewtom As always, the way you find out which command/function is executed by a key chord is to issue: C-h k. So for example: C-h k C-h k will tell you that C-h k is bound to 'describe-key', which is exactly what you want.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.