* emacs-w3m copy url under point
@ 2002-09-27 18:34 mr.sparkle
2002-09-28 2:49 ` Michael Slass
0 siblings, 1 reply; 4+ messages in thread
From: mr.sparkle @ 2002-09-27 18:34 UTC (permalink / raw)
Is there any way in emacs-w3m to copy the url under point? It shows up
in the minibuffer, so a method of copying minibuffer contents would
work, if no direct way to do it from emacs-w3m.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-w3m copy url under point
2002-09-27 18:34 emacs-w3m copy url under point mr.sparkle
@ 2002-09-28 2:49 ` Michael Slass
2002-09-28 6:59 ` Shiro Takeda
0 siblings, 1 reply; 4+ messages in thread
From: Michael Slass @ 2002-09-28 2:49 UTC (permalink / raw)
happy@vole.com (mr.sparkle) writes:
>Is there any way in emacs-w3m to copy the url under point? It shows up
>in the minibuffer, so a method of copying minibuffer contents would
>work, if no direct way to do it from emacs-w3m.
Try this: (VERY lightly tested)
(defun w3m-copy-current-anchor-as-kill ()
"Copy the link (as a string) under the point to the kill ring"
(interactive)
(let ((link (w3m-anchor)))
(if (not link)
(message "The point is not over an anchor.")
(kill-new link)
(message "Copied \"%s\" to kill-ring." link))))
Bind to your favorite key sequence.
--
Mike Slass
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-w3m copy url under point
2002-09-28 2:49 ` Michael Slass
@ 2002-09-28 6:59 ` Shiro Takeda
2002-09-29 22:32 ` mr.sparkle
0 siblings, 1 reply; 4+ messages in thread
From: Shiro Takeda @ 2002-09-28 6:59 UTC (permalink / raw)
Michael Slass <miknrene@drizzle.com> wrote in message news:<m365wqesix.fsf@localhost.localdomain>...
> happy@vole.com (mr.sparkle) writes:
>
> >Is there any way in emacs-w3m to copy the url under point? It shows up
> >in the minibuffer, so a method of copying minibuffer contents would
> >work, if no direct way to do it from emacs-w3m.
>
>
> Try this: (VERY lightly tested)
>
> (defun w3m-copy-current-anchor-as-kill ()
> "Copy the link (as a string) under the point to the kill ring"
> (interactive)
> (let ((link (w3m-anchor)))
> (if (not link)
> (message "The point is not over an anchor.")
> (kill-new link)
> (message "Copied \"%s\" to kill-ring." link))))
>
> Bind to your favorite key sequence.
At least in my emacs-w3m (CVS version),
I can copy the url under the point with `w3m-print-this-url'
(binded to u).
---
Shiro Takeda <ged9203@srv.cc.hit-u.ac.jp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-w3m copy url under point
2002-09-28 6:59 ` Shiro Takeda
@ 2002-09-29 22:32 ` mr.sparkle
0 siblings, 0 replies; 4+ messages in thread
From: mr.sparkle @ 2002-09-29 22:32 UTC (permalink / raw)
On 27 Sep 2002, ged9203@srv.cc.hit-u.ac.jp wrote:
> Michael Slass <miknrene@drizzle.com> wrote in message
> news:<m365wqesix.fsf@localhost.localdomain>...
>> happy@vole.com (mr.sparkle) writes:
>>
>> >Is there any way in emacs-w3m to copy the url under point? It
>> >shows up in the minibuffer, so a method of copying minibuffer
>> >contents would work, if no direct way to do it from emacs-w3m.
>>
>>
>> Try this: (VERY lightly tested)
>>
>> (defun w3m-copy-current-anchor-as-kill ()
>> "Copy the link (as a string) under the point to the kill ring"
>> (interactive)
>> (let ((link (w3m-anchor)))
>> (if (not link)
>> (message "The point is not over an anchor.")
>> (kill-new link)
>> (message "Copied \"%s\" to kill-ring." link))))
This seems to work
>>
>> Bind to your favorite key sequence.
>
> At least in my emacs-w3m (CVS version),
> I can copy the url under the point with `w3m-print-this-url'
> (binded to u).
So does this! I must have missed it in reading the
documentation. Thank you both for your help!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-29 22:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-27 18:34 emacs-w3m copy url under point mr.sparkle
2002-09-28 2:49 ` Michael Slass
2002-09-28 6:59 ` Shiro Takeda
2002-09-29 22:32 ` mr.sparkle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).