all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to obtain a url and store it
@ 2008-03-03 18:55 someusernamehere
  2008-03-03 18:57 ` Harald Hanche-Olsen
  2008-03-04  8:20 ` Tim X
  0 siblings, 2 replies; 6+ messages in thread
From: someusernamehere @ 2008-03-03 18:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hey, how I can get an url which is in some place in a paragraph and
store it in a local var?

Thanks


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to obtain a url and store it
  2008-03-03 18:55 how to obtain a url and store it someusernamehere
@ 2008-03-03 18:57 ` Harald Hanche-Olsen
  2008-03-03 19:05   ` someusernamehere
  2008-03-04  8:20 ` Tim X
  1 sibling, 1 reply; 6+ messages in thread
From: Harald Hanche-Olsen @ 2008-03-03 18:57 UTC (permalink / raw)
  To: help-gnu-emacs

+ someusernamehere <someusernamehere@gmail.com>:

> Hey, how I can get an url which is in some place in a paragraph and
> store it in a local var?

You could start by looking at thing-at-point.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to obtain a url and store it
  2008-03-03 18:57 ` Harald Hanche-Olsen
@ 2008-03-03 19:05   ` someusernamehere
  2008-03-03 19:55     ` Harald Hanche-Olsen
  2008-03-04  8:22     ` Tim X
  0 siblings, 2 replies; 6+ messages in thread
From: someusernamehere @ 2008-03-03 19:05 UTC (permalink / raw)
  To: help-gnu-emacs

Harald Hanche-Olsen escreveu:
> > Hey, how I can get an url which is in some place in a paragraph and
> > store it in a local var?
>
> You could start by looking at thing-at-point.

yeah, but, how move the point where the url is in the paragraph?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to obtain a url and store it
  2008-03-03 19:05   ` someusernamehere
@ 2008-03-03 19:55     ` Harald Hanche-Olsen
  2008-03-04  8:22     ` Tim X
  1 sibling, 0 replies; 6+ messages in thread
From: Harald Hanche-Olsen @ 2008-03-03 19:55 UTC (permalink / raw)
  To: help-gnu-emacs

+ someusernamehere <someusernamehere@gmail.com>:

> Harald Hanche-Olsen escreveu:
>> > Hey, how I can get an url which is in some place in a paragraph and
>> > store it in a local var?
>>
>> You could start by looking at thing-at-point.
>
> yeah, but, how move the point where the url is in the paragraph?

Search for some regexp that will match the start of an URL?
Something along the lines of

  \(https?\|ftp\|mailto\|gopher\|git\):

Extend with any protocol names you wish to cover.
(Gee, I haven't seen a gopher server in ages.  Do they still exist?)

Perhaps you could just search for [a-z]: and then go to the match and
try thing-at-point to see if it will recognize it as an url or not.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to obtain a url and store it
  2008-03-03 18:55 how to obtain a url and store it someusernamehere
  2008-03-03 18:57 ` Harald Hanche-Olsen
@ 2008-03-04  8:20 ` Tim X
  1 sibling, 0 replies; 6+ messages in thread
From: Tim X @ 2008-03-04  8:20 UTC (permalink / raw)
  To: help-gnu-emacs

someusernamehere <someusernamehere@gmail.com> writes:

> Hey, how I can get an url which is in some place in a paragraph and
> store it in a local var?
>
> Thanks

Are you talking about doing this interactively or programatically? 

If its just interactive, you could either put it into the kill ring
using the standard copy commands. If you want it in a more defined
place, I'd suggest registers are the best solution - you can collect
multiple URLs into different registers and then paste them into buffers
at any time without possibly losing them in the kill ring after other
cut/copy operations. 

If your talking about how to do this in elisp, you need to provide more
details.

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to obtain a url and store it
  2008-03-03 19:05   ` someusernamehere
  2008-03-03 19:55     ` Harald Hanche-Olsen
@ 2008-03-04  8:22     ` Tim X
  1 sibling, 0 replies; 6+ messages in thread
From: Tim X @ 2008-03-04  8:22 UTC (permalink / raw)
  To: help-gnu-emacs

someusernamehere <someusernamehere@gmail.com> writes:

> Harald Hanche-Olsen escreveu:
>> > Hey, how I can get an url which is in some place in a paragraph and
>> > store it in a local var?
>>
>> You could start by looking at thing-at-point.
>
> yeah, but, how move the point where the url is in the paragraph?

Use regexp search? 

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-04  8:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-03 18:55 how to obtain a url and store it someusernamehere
2008-03-03 18:57 ` Harald Hanche-Olsen
2008-03-03 19:05   ` someusernamehere
2008-03-03 19:55     ` Harald Hanche-Olsen
2008-03-04  8:22     ` Tim X
2008-03-04  8:20 ` Tim X

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.