From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: how to obtain a url and store it Date: Mon, 03 Mar 2008 20:55:34 +0100 Organization: Norwegian university of science and technology Message-ID: References: <2f08782c-ebdc-4c8d-8e5f-2b28c6f588c6@d4g2000prg.googlegroups.com> <86f2ce2b-6682-4181-8540-78159776317b@z17g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204576904 2761 80.91.229.12 (3 Mar 2008 20:41:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2008 20:41:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 03 21:42:08 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JWHTo-000623-TH for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 21:41:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWHTI-0004fn-5W for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 15:41:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: kuling.itea.ntnu.no 1204574134 12662 129.241.15.140 (3 Mar 2008 19:55:34 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Mon, 3 Mar 2008 19:55:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:kB92XIjRkRvDVf0kJ8vF2dnAoK4= Original-Xref: shelby.stanford.edu gnu.emacs.help:156654 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52026 Archived-At: + someusernamehere : > 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 - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell