From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Function: Extract link location to killring Date: Thu, 23 Jun 2011 16:20:47 +0200 Message-ID: <4E034BBF.5030700@christianmoe.com> References: <4E0307D5.8080105@christianmoe.com> <4E031D7C.4080104@christianmoe.com> <87oc1ozqzu.fsf@mean.albasani.net> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZkkQ-0002sU-5c for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 10:19:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZkkP-0003aC-0b for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 10:19:09 -0400 Received: from mars.hitrost.net ([91.185.211.18]:53142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZkkO-0003Zk-Jx for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 10:19:08 -0400 In-Reply-To: <87oc1ozqzu.fsf@mean.albasani.net> 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: Memnon Anon Cc: emacs-orgmode@gnu.org On 6/23/11 2:17 PM, Memnon Anon wrote: > (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))))) Thanks, that seems to work nicely! Thanks for the tip about saving two keystrokes by aborting with C-g, too -- why didn't I think of that?? Yours, Christian