emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Function: Extract link location to killring (was: Copy link at point


From: Memnon Anon
Subject: [O] Function: Extract link location to killring (was: Copy link at point)
Date: Thu, 23 Jun 2011 12:17:24 +0000 (UTC)

Christian Moe <address@hidden> writes:

> That wasn't clear -- I meant to copy the URL part (link type and path)
> of the link (not the description part).

Does this work?
I did only some quick testing, this is "C-c C-l" cut down 
for this purpose only.

--8<---------------cut here---------------start------------->8---
(defun my-extract-link ()
  "Extract the link location at point and put it on the killring."
  (interactive)
  (when (org-in-regexp org-bracket-link-regexp 1)
    (kill-new (org-link-unescape (org-match-string-no-properties 1)))))
--8<---------------cut here---------------end--------------->8---

Memnon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]