add marker to evil-jump-list before executing arbitrary function

jenia.ivlev jenia.ivlev at
Wed Jun 3 06:40:43 CEST 2015


I want to be able to jump back, using C-o, to the position where I execute
I have wrote this small program:

  (defun ggtags-go-to-definition ()
    (let ((current-pos (make-marker)))
      (add-to-list 'evil-jump-list current-pos)
      (ggtags-find-tag-dwim (thing-at-point 'symbol))))

But it gives me the error "Marker does not point anywhere".

Can someone please tell me, how do I write this program correctly? That
is, I want to store the position before executing `ggtags...` and then
be able to jump back (using "C-o" a.k.a "evil-jump-back").

Thanks in advance for your kind help.

More information about the implementations-list mailing list