Skip to content

Instantly share code, notes, and snippets.

@jmillikan
Created April 28, 2013 19:06
Show Gist options
  • Save jmillikan/5478028 to your computer and use it in GitHub Desktop.
Save jmillikan/5478028 to your computer and use it in GitHub Desktop.
Emacs: Number of characters in range, as message and kill
(defun range-pls ()
"Get length of marked section as message and kill"
(interactive)
(let ((range (number-to-string (- (point) (mark)))))
(message range)
(kill-new range)))
(global-set-key (kbd "C-c r") 'range-pls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment