From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Function: Extract link location to killring (was: Copy link at point) Date: Thu, 23 Jun 2011 12:17:24 +0000 (UTC) Message-ID: <87oc1ozqzu.fsf@mean.albasani.net> References: <4E0307D5.8080105@christianmoe.com> <4E031D7C.4080104@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZiqr-0001iG-FB for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZiqo-0004wr-Vy for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:17:40 -0400 Received: from lo.gmane.org ([80.91.229.12]:55354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZiqo-0004wV-Is for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:17:38 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZiqm-0003n1-Rn for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 14:17:36 +0200 Received: from e178219054.adsl.alicedsl.de ([85.178.219.54]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 14:17:36 +0200 Received: from gegendosenfleisch by e178219054.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Jun 2011 14:17:36 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Christian Moe 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