emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Copy link at point


From: Eric S Fraga
Subject: Re: [O] Copy link at point
Date: Thu, 23 Jun 2011 13:56:33 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Memnon Anon <address@hidden> writes:

> Christian Moe <address@hidden> 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
>>> <RET> <RET> 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)



reply via email to

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