Skip to content

Instantly share code, notes, and snippets.

@matthew-ball
Created June 5, 2012 05:37
Show Gist options
  • Save matthew-ball/2872893 to your computer and use it in GitHub Desktop.
Save matthew-ball/2872893 to your computer and use it in GitHub Desktop.
(defun my-org-extract-link ()
"Extract the link location at point and put it on the killring."
(interactive)
(save-excursion
;; TODO: capture `file-name' details
;; TODO: capture `title' details
(when (org-in-regexp org-bracket-link-regexp 1)
(let ((record-file (org-link-unescape (org-match-string-no-properties 1)))
(record-title (org-link-unescape (org-match-string-no-properties 3))))
(message (concat "File: " record-file ", Title: " record-title))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment