help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to obtain a url and store it


From: Harald Hanche-Olsen
Subject: Re: how to obtain a url and store it
Date: Mon, 03 Mar 2008 20:55:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix)

+ 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


reply via email to

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