all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to fetch a URL to an Emacs buffer?
@ 2007-03-11 14:40 kj
  2007-03-11 16:00 ` David Hansen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: kj @ 2007-03-11 14:40 UTC (permalink / raw)
  To: help-gnu-emacs



Is there an Emacs command that would load a given URL into an Emacs
buffer?

Normally I would 1) switch to a browser; 2) visit the desired URL;
3) use the browser's "Save as..." command to save the URL's content;
4) switch back to Emacs; and 5) open the downloaded file, but this
but this song-and-dance can get cumbersome after a while.

If the function I'm interested in doesn't exist, is there something
close that I could hack?  Basically I need Emacs functions to send
and receive HTTP messages.

TIA!

kj

-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-11 14:40 How to fetch a URL to an Emacs buffer? kj
@ 2007-03-11 16:00 ` David Hansen
  2007-03-11 17:45 ` Peter Danenberg
       [not found] ` <mailman.800.1173631525.7795.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: David Hansen @ 2007-03-11 16:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 11 Mar 2007 14:40:10 +0000 (UTC) kj wrote:

> Is there an Emacs command that would load a given URL into an Emacs
> buffer?
>
> Normally I would 1) switch to a browser; 2) visit the desired URL;
> 3) use the browser's "Save as..." command to save the URL's content;
> 4) switch back to Emacs; and 5) open the downloaded file, but this
> but this song-and-dance can get cumbersome after a while.

Make Emacs your browser :)  http://emacs-w3m.namazu.org/

If you want to do it from lisp there's the url.el package that is
part of Emacs 22, there's always the quick and dirty solution with a
shell and wget.

David

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-11 14:40 How to fetch a URL to an Emacs buffer? kj
  2007-03-11 16:00 ` David Hansen
@ 2007-03-11 17:45 ` Peter Danenberg
       [not found] ` <mailman.800.1173631525.7795.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Danenberg @ 2007-03-11 17:45 UTC (permalink / raw)
  To: help-gnu-emacs

> Is there an Emacs command that would load a given URL into an Emacs
> buffer?


     What about `C-u C-M-! curl -s google.com'?

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

* Re: How to fetch a URL to an Emacs buffer?
       [not found] ` <mailman.800.1173631525.7795.help-gnu-emacs@gnu.org>
@ 2007-03-12  0:49   ` Robert D. Crawford
  2007-03-12 10:25     ` Hadron
  0 siblings, 1 reply; 9+ messages in thread
From: Robert D. Crawford @ 2007-03-12  0:49 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Danenberg <pcd@wikitex.org> writes:

>> Is there an Emacs command that would load a given URL into an Emacs
>> buffer?
>
>      What about `C-u C-M-! curl -s google.com'?

Shouldn't that be C-u C-! curl -s google.com'?  

rdc
-- 
Robert D. Crawford                                      rdc1x@comcast.net

I never said all Democrats were saloonkeepers; what I said was all
saloonkeepers were Democrats.

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-12  0:49   ` Robert D. Crawford
@ 2007-03-12 10:25     ` Hadron
  2007-03-12 10:42       ` Robert D. Crawford
                         ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hadron @ 2007-03-12 10:25 UTC (permalink / raw)
  To: help-gnu-emacs

"Robert D. Crawford" <rdc1x@comcast.net> writes:

> Peter Danenberg <pcd@wikitex.org> writes:
>
>>> Is there an Emacs command that would load a given URL into an Emacs
>>> buffer?
>>
>>      What about `C-u C-M-! curl -s google.com'?
>
> Shouldn't that be C-u C-! curl -s google.com'?  
>
> rdc

What command is either of them? I cant issue either from my kbd.

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-12 10:25     ` Hadron
@ 2007-03-12 10:42       ` Robert D. Crawford
  2007-03-12 11:14       ` David Hansen
       [not found]       ` <mailman.832.1173698660.7795.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Robert D. Crawford @ 2007-03-12 10:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hadron <hadronquark@gmail.com> writes:

> "Robert D. Crawford" <rdc1x@comcast.net> writes:
>>
>> Shouldn't that be C-u C-! curl -s google.com'?  
>
> What command is either of them? I cant issue either from my kbd.

On my system, and I am pretty sure this is the default keybinding:

 meta !  runs the command shell-command
  which is an interactive compiled Lisp function in `simple.el'.
It is bound to  meta ! ,  <menu-bar> <tools> <shell> .
(shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)

Execute string COMMAND in inferior shell; display output, if any.
With prefix argument, insert the COMMAND's output at point.

rdc
-- 
Robert D. Crawford                                      rdc1x@comcast.net

It is wise to keep in mind that neither success nor failure is ever final.
		-- Roger Babson

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-12 10:25     ` Hadron
  2007-03-12 10:42       ` Robert D. Crawford
@ 2007-03-12 11:14       ` David Hansen
  2007-03-12 13:59         ` Peter Danenberg
       [not found]       ` <mailman.832.1173698660.7795.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 9+ messages in thread
From: David Hansen @ 2007-03-12 11:14 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, 12 Mar 2007 11:25:30 +0100 Hadron wrote:

> "Robert D. Crawford" <rdc1x@comcast.net> writes:
>
>> Peter Danenberg <pcd@wikitex.org> writes:
>>
>>>> Is there an Emacs command that would load a given URL into an Emacs
>>>> buffer?
>>>
>>>      What about `C-u C-M-! curl -s google.com'?
>>
>> Shouldn't that be C-u C-! curl -s google.com'?  
>>
>> rdc
>
> What command is either of them? I cant issue either from my kbd.

I think they wanted to say C-u M-! aka `shell-command' :)

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

* Re: How to fetch a URL to an Emacs buffer?
  2007-03-12 11:14       ` David Hansen
@ 2007-03-12 13:59         ` Peter Danenberg
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Danenberg @ 2007-03-12 13:59 UTC (permalink / raw)
  To: help-gnu-emacs

> I think they wanted to say C-u M-! aka `shell-command' :)


     You're  right, David; a spurious ctrl slipped in (which
happens to work, by the way, in my Emacs).

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

* Re: How to fetch a URL to an Emacs buffer?
       [not found]       ` <mailman.832.1173698660.7795.help-gnu-emacs@gnu.org>
@ 2007-03-12 15:04         ` Robert D. Crawford
  0 siblings, 0 replies; 9+ messages in thread
From: Robert D. Crawford @ 2007-03-12 15:04 UTC (permalink / raw)
  To: help-gnu-emacs

David Hansen <david.hansen@gmx.net> writes:

> On Mon, 12 Mar 2007 11:25:30 +0100 Hadron wrote:
>
>> "Robert D. Crawford" <rdc1x@comcast.net> writes:
>>
>>> Shouldn't that be C-u C-! curl -s google.com'?  

> I think they wanted to say C-u M-! aka `shell-command' :)

Oops.  Pretty lame when I screw up and my correction has to be
corrected.  

Thanks and apologies,
rdc
-- 
Robert D. Crawford                                      rdc1x@comcast.net

Is a wedding successful if it comes off without a hitch?

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

end of thread, other threads:[~2007-03-12 15:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 14:40 How to fetch a URL to an Emacs buffer? kj
2007-03-11 16:00 ` David Hansen
2007-03-11 17:45 ` Peter Danenberg
     [not found] ` <mailman.800.1173631525.7795.help-gnu-emacs@gnu.org>
2007-03-12  0:49   ` Robert D. Crawford
2007-03-12 10:25     ` Hadron
2007-03-12 10:42       ` Robert D. Crawford
2007-03-12 11:14       ` David Hansen
2007-03-12 13:59         ` Peter Danenberg
     [not found]       ` <mailman.832.1173698660.7795.help-gnu-emacs@gnu.org>
2007-03-12 15:04         ` Robert D. Crawford

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.