I'm new to elisp, but one thing I really want to understand is either to wait for the ace jump to finish before following the instructions, or how to get the position from the ace jump instead of moving the cursor. My goal is to be able to select a line with ace-jump, copy it, and then paste it right above my current line. I started by first trying to go to the line with an ace jump and then duplicating it in place, but that didn't work. Here is what I have for this:
(defun ace-jump-yank-line-above ()
(interactive)
(ace-jump-line-mode)
(kill-ring-save (line-beginning-position) (line-beginning-position 2) )
(yank)
)
But it gives me weird behavior
source
share