From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19822: url-retrieve: allow to fail when no document is associated with the URI Date: Mon, 09 Feb 2015 16:55:35 +0000 Message-ID: <87mw4ndny0.fsf_-_@violet.siamics.net> References: <87mwcmb8nx.fsf@violet.siamics.net> <87r3wz7h0e.fsf@violet.siamics.net> <877fxricgb.fsf_-_@violet.siamics.net> <87fvbfy8xv.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1423500983 28001 80.91.229.3 (9 Feb 2015 16:56:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 16:56:23 +0000 (UTC) To: 19822@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 09 17:56:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKrd6-0000dl-9B for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Feb 2015 17:56:12 +0100 Original-Received: from localhost ([::1]:33770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrd5-0002j0-S2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Feb 2015 11:56:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrd1-0002fK-Ep for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:56:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKrcy-0001n3-96 for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:56:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrcw-0001kF-Jv for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:56:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YKrcw-0000be-5t for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Feb 2015 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14235009522311 (code B ref -1); Mon, 09 Feb 2015 16:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Feb 2015 16:55:52 +0000 Original-Received: from localhost ([127.0.0.1]:38476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YKrcl-0000bC-OF for submit@debbugs.gnu.org; Mon, 09 Feb 2015 11:55:52 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:43039) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YKrcj-0000b2-HN for submit@debbugs.gnu.org; Mon, 09 Feb 2015 11:55:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=V/Pp4oJdwYmzCSjX5JTSEVqSOIAoj/Vv2YyqWR48YXI=; b=FnT+wPlYE1gYuNpJIBItiODUg3XZ2vVgsy259FARkaslC8JjO8l3arOAPISlYNMR7/LjDH4uftNb0x7eMZNowDvcF9F9x7oVAj/XWoYh277TqVUJ8GbPEXaWTfFLpYSpqo0cNoViTypgPkccoCT20zwTi/MG99V9xVQTTit1VDM=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YKrch-0001Io-1m for submit@debbugs.gnu.org; Mon, 09 Feb 2015 16:55:47 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YKrcW-0003iS-HT for submit@debbugs.gnu.org; Mon, 09 Feb 2015 23:55:36 +0700 In-Reply-To: <87fvbfy8xv.fsf@violet.siamics.net> (Ivan Shmakov's message of "Mon, 12 Jan 2015 21:40:12 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99213 Archived-At: Package: emacs Severity: wishlist The handling of the news: (nntp:), irc:, and (as it seems) ftp: (file:) URI schemes is implemented in such a way that a /successful/ url-retrieve call is /not/ in fact guaranteed to return a =E2=80=9Cretrieved document=E2=80=9D of any kind. Consider, e. g= .: (let ((url-proxy-services nil)) (list (url-retrieve "news://news.aioe.org/alt.sources" (lambda (&rest any) (message "news: %S" any))) (url-retrieve "irc://irc.freenode.net:6667/x-test-channel" (lambda (&rest any) (message "irc: %S" any))))) Here, the first call starts up Gnus and opens a *Summary* buffer for the group; the second starts Rcirc by default; either call returns nil. I=E2=80=99d expect for these two calls to instead produce the buffers /describing/ those respective resources =E2=80=93 the newsgroup (say, its XOVER data) and the IRC channel (the server responses to a few IRC commands issued for the channel.) That is: I=E2=80=99d expect url-retrieve to behave much like wget(1), =E2=80=93 /not/ like, say, run-mailcap(1). Naturally, this is orthogonal to the use of Gnus, Rcirc, etc. to do the actual job; and also to the ability to spawn them via M-x browse-url. (Which seems unsupported, anyway.) As for the possible implementation, there may be a separate dynamic variable (say, url-retrieve-action) to tell the scheme handlers whether they should only try to retrieve the URI (and signal an error if not supported), or that they /may/ resort to the current behavior (i. e., start up some scheme-specific interaction facility.) Alternatively, url-retrieve may be changed to pass an additional non-nil argument to the scheme handler function in the case that the call is not intended to result in further user interaction. There may be either a separate call (url-run?) to request such an interaction, or a new argument to url-retrieve. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A