Skip to content

Instantly share code, notes, and snippets.

@darrik
Last active August 29, 2015 14:05
Show Gist options
  • Save darrik/ecc5926e5315c71e862d to your computer and use it in GitHub Desktop.
Save darrik/ecc5926e5315c71e862d to your computer and use it in GitHub Desktop.
Copy current field to system clipboard
(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