* Yanking the descriptive part of a link
@ 2007-04-17 21:58 Bastien
2007-04-18 2:26 ` William Henney
2007-04-18 7:02 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Bastien @ 2007-04-17 21:58 UTC (permalink / raw)
To: emacs-orgmode
Hi list,
i came accross this situation several times: i have a (long) link in an
org-mode buffer and want to label it by yanking some text.
My first move was to select the link as the region and try C-u C-c C-l on
it, since org-insert-link does just the opposite : it takes the region as
the default label for some link you want to yank.
But the universal argument of C-c C-l makes org-insert-link deal with file
names.
Does anybody know any automated way to yank text as the descriptive-part of
an org-mode link ?
Thanks !
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Yanking the descriptive part of a link
2007-04-17 21:58 Yanking the descriptive part of a link Bastien
@ 2007-04-18 2:26 ` William Henney
2007-04-18 7:06 ` Bastien
2007-04-18 7:02 ` Bastien
1 sibling, 1 reply; 5+ messages in thread
From: William Henney @ 2007-04-18 2:26 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Hi Bastien
On 4/17/07, Bastien <bzg@altern.org> wrote:
> Does anybody know any automated way to yank text as the descriptive-part of
> an org-mode link ?
>
Do these solutions count?
With cursor anywhere in the link:
C-c C-l RET M-h C-y
Or, with cursor at beginning [*] of the link
M-@ M-@ ..... C-y
You have to repeat M-@ [**] once for each word in the original
description (or give it a numeric argument)
Cheers
Will
Footnotes:
[*] Make sure you approach from the right, not the left, if using kbd commands
[**] M-@ is a pain to type on my keyboard
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Yanking the descriptive part of a link
2007-04-18 2:26 ` William Henney
@ 2007-04-18 7:06 ` Bastien
2007-04-18 13:36 ` William Henney
0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2007-04-18 7:06 UTC (permalink / raw)
To: emacs-orgmode
"William Henney" <whenney@gmail.com> writes:
>> Does anybody know any automated way to yank text as the descriptive-part of
>> an org-mode link ?
>
> Do these solutions count?
>
> With cursor anywhere in the link:
>
> C-c C-l RET M-h C-y
>
> Or, with cursor at beginning [*] of the link
>
> M-@ M-@ ..... C-y
Sorry my question was not clear. I wanted to import (possibly external)
text as the descriptive part of a link, not to copy the descriptive text
itself. Thanks anyway, i didn't know M-@ !
Regards,
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Yanking the descriptive part of a link
2007-04-18 7:06 ` Bastien
@ 2007-04-18 13:36 ` William Henney
0 siblings, 0 replies; 5+ messages in thread
From: William Henney @ 2007-04-18 13:36 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
On 4/18/07, Bastien <bzg@altern.org> wrote:
> "William Henney" <whenney@gmail.com> writes:
> > With cursor anywhere in the link:
> >
> > C-c C-l RET M-h C-y
> >
> > Or, with cursor at beginning [*] of the link
> >
> > M-@ M-@ ..... C-y
>
> Sorry my question was not clear. I wanted to import (possibly external)
> text as the descriptive part of a link, not to copy the descriptive text
> itself.
Yes, but I think I understood you correctly. I was assuming you wanted
to replace the existing descriptive text with new text that you had
just copied to the kill ring or cut buffer. Note that they end in C-y,
not M-w. However, I now see that my methods rely on having activated
the emacs option whereby yanked (pasted) text overwrites the current
marked region (selection). I think this is controlled by zmacs-region
and cua-mode, which maybe you don't have activated. Sorry for the
confusion.
Cheers
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Yanking the descriptive part of a link
2007-04-17 21:58 Yanking the descriptive part of a link Bastien
2007-04-18 2:26 ` William Henney
@ 2007-04-18 7:02 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2007-04-18 7:02 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg@altern.org> writes:
> i came accross this situation several times: i have a (long) link in an
> org-mode buffer and want to label it by yanking some text.
>
> My first move was to select the link as the region and try C-u C-c C-l on
> it, since org-insert-link does just the opposite : it takes the region as
> the default label for some link you want to yank.
First move was wrong. C-c C-l does the job correctly when no region is
set. Sorry for the noise.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-04-18 13:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-17 21:58 Yanking the descriptive part of a link Bastien
2007-04-18 2:26 ` William Henney
2007-04-18 7:06 ` Bastien
2007-04-18 13:36 ` William Henney
2007-04-18 7:02 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.