Last active
August 29, 2015 14:05
-
-
Save darrik/ecc5926e5315c71e862d to your computer and use it in GitHub Desktop.
Copy current field to system clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun darrik/org-copy-field () | |
"Copy current field to system clipboard." | |
(interactive) | |
(save-excursion | |
(call-interactively 'org-table-copy-region) | |
(let* ((contents (caar org-table-clip)) | |
(trim1 (replace-regexp-in-string " +" "" contents)) | |
(trim2 (replace-regexp-in-string "^ " "" trim1))) | |
(kill-new trim2)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment