[Top][All Lists]

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

Re: browse-url-generic-program not reporting stdout

From: Kevin Rodgers
Subject: Re: browse-url-generic-program not reporting stdout
Date: Mon, 13 Dec 2004 12:29:48 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Dan Jacobson wrote:
> I did (setq browse-url-generic-program "wwwoffle")
> but do not see wwwoffle's "Requesting: http://bla.bla...";
> message which I expect in the minibuffer.
> I suppose stdout isn't interesting to it.
> OK, I suppose it detaches etc. so can't talk anymore.
> (I was wanting a way to register urls for later fetching.)

Well, it's definitely intentional: browse-url-generic calls
browse-url-generic-program via start-process and specifies nil as the
BUFFER argument.  In fact, all the browse-url- commands that call
start-process do the same.

You could simply replace those occurrences of nil with a buffer name
that you could display.  And since almost all those commands return the
process object, you could write an after advice that sets the process
filter to a simple function to display the output via message.

Emacs could easily be enhanced with a couple new variables for the user
to customize: browse-url-process-buffer and -filter.

> It would be neat if I was asked to confirm I want to requst the URL too.
> A confirm varible that would trigger a y-or-no p.
> Because these ffap days, it's so easy to do find-file on an URL.

That is something that is trivial for a power user like yourself:

(defadvice browse-url-generic (around y-or-n-p activate)
  "Query the user for confirmation before loading the URL."
  (and (y-or-n-p (format "Load <url:%s>? " (ad-get-arg 0)))

> Wait, I should be able to give differnt lettered responses depending
> on if I want to browse it with firefly, flowerfox or whatever, or
> register it with wwwoffle, or chicken out.

That would require a little more hacking.

Kevin Rodgers

reply via email to

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