Skip to content

Instantly share code, notes, and snippets.

@Zolomon
Last active October 21, 2015 09:55
Show Gist options
  • Select an option

  • Save Zolomon/61ef174234d41276a7cb to your computer and use it in GitHub Desktop.

Select an option

Save Zolomon/61ef174234d41276a7cb to your computer and use it in GitHub Desktop.
copy-buffer.el
;; copy buffer
(defun copy-buffer ()
"Copies the whole buffer, without moving the cursor point."
(interactive)
(copy-region-as-kill (point-min) (point-max)))
(defun copy-buffer-with-notification ()
"Copies the whole buffer, without moving the cursor point, and writes upon completion in the minibuffer."
(interactive)
(copy-buffer)
(message "Copied buffer!"))
(global-set-key (kbd "C-c z") 'copy-buffer-with-notification)
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment