Emacs Commpand to Copy Rectangle to Clipboard

Here's a command to copy a column of text to clipboard.

(defun copy-rectangle-to-clipboard (p1 p2)
  "Copy region as column (rectangle) to operating system's clipboard.
This command will also put the text in register 0. (see: `copy-to-register')"
  (interactive "r")
  (let ((x-select-enable-clipboard t))
    (copy-rectangle-to-register ?0 p1 p2)
       (insert-register ?0)
       (buffer-string) )) ) )

See also: Emacs: Manipulate Column Text, string-rectangle, ASCII-Art

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs