Fork me on GitHub
#emacs
<
2016-07-21
>
verma18:07:03

sometimes when I am editing code I need to peek at a function and then get back to what I was doing, is there a good way of doing this without having to switch files or scroll up and down and then jump back to point I was editing at?

niamu19:07:38

@verma: There are probably way better ways to do this… C-u C-SPC may work for you. Set a mark with C-SPC first and then you can use C-u C-SPC to go back to where you were.

verma19:07:45

I use evil-mode so I kind of have a way to set a marker, may be I should use it more often 🙂

verma19:07:03

I think there’s a M-. to jump to definition that will help with it I would think

radon19:07:23

M-* jumps back after M-. iirc

verma19:07:53

@radon: do you know which actual cider function it calls? .. seems like I have a conflict in evil-mode

radon19:07:55

In my setup I have C-x <left> bound to previous-buffer.

radon19:07:59

That’s pretty foolproof.

radon19:07:05

Oh… just a sec.

radon19:07:20

pop-tag-mark

radon19:07:36

It’s from etags.el.

radon19:07:49

M-, runs the command tags-loop-continue
also seems to do a similar thing.

verma19:07:52

“No previous locations for find-tag invocation"

radon19:07:05

Did you previously M-.?

verma19:07:20

just did it on a new symbol

radon19:07:31

What do you mean?

verma19:07:47

I moved my cursor onto a function invocation and hit M-.

verma19:07:56

jump to definition according to cider-docs

radon19:07:17

And that worked, and pressing M-* immediately after doesn’t?

verma19:07:41

well, my M-. is bound to something else from evil, so I interactively invoked the command

radon19:07:59

You might have to enable something… I’m using https://github.com/RallySoftware/rally-emacs and unable to debug why it might not be working for you.

verma19:07:25

ah, no problem

verma19:07:32

I will take a look at it, thanks for your help