From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Copy link at point Date: Thu, 23 Jun 2011 13:56:33 +0100 Message-ID: <8739j04sfy.fsf@pinto.chemeng.ucl.ac.uk> References: <4E0307D5.8080105@christianmoe.com> <4E031D7C.4080104@christianmoe.com> <87tybgzs8v.fsf@mean.albasani.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjSb-0004Yt-Ju for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZjSZ-0003gD-NP for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:56:41 -0400 Received: from vscani-d2.ucl.ac.uk ([144.82.108.133]:40166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjSZ-0003fn-6L for emacs-orgmode@gnu.org; Thu, 23 Jun 2011 08:56:39 -0400 In-Reply-To: <87tybgzs8v.fsf@mean.albasani.net> (Memnon Anon's message of "Thu, 23 Jun 2011 12:00:05 +0000 (UTC)") 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 Memnon Anon writes: > Christian Moe writes: > >>> Does anyone know a way to copy a link at point with fewer keystrokes than >>> >>> C-c C-l to edit the link >>> C-a C-k C-y to go to the beginning of the link line, kill and re-yank >>> the link >>> to finish editing the link without changing anything > > What about: > > C-c C-l C-a C-k C-g > > Memnon And if you do this, saving it as a kmacro, you can generate code that does this: #+begin_src emacs-lisp (fset 'getlink (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ("\C-c\C-l\C-a\C-k\C-g" 0 "%d")) arg))) #+end_src You can then bind /getlink/ to a key or execute it directly with M-x getlink RET -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.422.g40d8)