From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: url package Date: Tue, 10 Mar 2009 17:06:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <68b99b75-6495-4023-8f79-7036be8b456b@e1g2000pra.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236753394 14505 80.91.229.12 (11 Mar 2009 06:36:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2009 06:36:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 11 07:37:50 2009 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 1LhI4Z-0008JT-GS for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Mar 2009 07:37:47 +0100 Original-Received: from localhost ([127.0.0.1]:50702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhI3D-0000V3-ML for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Mar 2009 02:36:23 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e1g2000pra.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 46 Original-NNTP-Posting-Host: 24.6.175.142 Original-X-Trace: posting.google.com 1236729994 25479 127.0.0.1 (11 Mar 2009 00:06:34 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 11 Mar 2009 00:06:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e1g2000pra.googlegroups.com; posting-host=24.6.175.142; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167513 comp.emacs:97996 X-Mailman-Approved-At: Wed, 11 Mar 2009 02:33:46 -0400 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:62827 Archived-At: On Mar 7, 4:28 pm, "B. T. Raven" wrote: > Johan Bockg=C3=A5rd wrote: > > "B. T. Raven" writes: > > >> A web site claims that by merely loading this package you can C-x C-f > >> on a Url and have its html code loaded into a buffer. I get a new > >> buffer with the name of the html file that would be listed by clicking > >> on View > Page Source in Firefox but the buffer is empty. What else > >> has to be done besides M-x load-library url before opening a buffer > >> with the url's source? > > > M-x url-handler-mode (load-library is not needed since the function is > > autoloaded) > > Thanks, Johan, but it still doesn't work as advertised, at least not on > w32 version 22.1 > M-x browse-url-at-point brings up the web page in Firefox and > View>PageSource shows the code, but if I try C-x C-fhttp://en-us.www.mozi= lla.com/en-US/firefox/about/ > I get an empty buffer named c:/en-us.www.mozilla.com/en-US/firefox/about/ > > Then I tried other web pages and some filled the buffer with html and > others didn't. Shouldn't there be some minimal block of html code on any > page? haven't tried the package you mentioned. However, i it's very easy to implement what you want, in about 10 min. you can call several external programs such as linx, w3, wget, curl, GET, to fetch the the source of a url, then create a buffer and insert it there. Just wrap it with shell-command-on-region. I think the following tutorial covers it exactly: =E2=80=A2 Elisp Wrapper For Perl Scripts http://xahlee.org/emacs/elisp_perl_wrapper.html a pure elisp solution is also easy. Just call one of those elisp packages that fetchs stuff over network. e.g. look at the installation instruction in ljupdate mode. Getting the url for the input of fetch is easy, by thing-at-point. Xah =E2=88=91 http://xahlee.org/ =E2=98=84