Skip to content

Instantly share code, notes, and snippets.

@JEG2
Created March 26, 2012 15:27
Show Gist options
  • Select an option

  • Save JEG2/2205907 to your computer and use it in GitHub Desktop.

Select an option

Save JEG2/2205907 to your computer and use it in GitHub Desktop.
This is a solution, but it seems non-ideal.
(defun jeg2s-yank-and-select ()
"This is a test command for how to create a selection."
(interactive)
(kill-new "selected")
(yank)
;; the following works, but I would like to be able to do it without a macro
(kmacro-exec-ring-item (quote ("" 0 "%d")) nil))
(global-set-key (kbd "C-c y") 'jeg2s-yank-and-select)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment