From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: Do you understand this? Date: Tue, 08 Mar 2005 00:34:51 +0000 Message-ID: <87hdjnotzo.fsf@tapsellferrier.co.uk> References: <87sm38jyhm.fsf@tapsellferrier.co.uk> <422C8B23.109@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110242130 5740 80.91.229.2 (8 Mar 2005 00:35:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2005 00:35:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 01:41:11 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8SmU-00010q-Ue for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2005 01:41:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8T0r-0005VQ-Qf for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 19:55:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D8Sza-00053N-1Q for emacs-devel@gnu.org; Mon, 07 Mar 2005 19:54:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D8SzW-000518-Or for emacs-devel@gnu.org; Mon, 07 Mar 2005 19:54:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8SzV-0004zu-6r for emacs-devel@gnu.org; Mon, 07 Mar 2005 19:54:29 -0500 Original-Received: from [80.168.156.78] (helo=owls-tree.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1D8Sim-0000Vy-W0 for emacs-devel@gnu.org; Mon, 07 Mar 2005 19:37:14 -0500 Original-Received: from [80.168.156.68] (helo=kanga) by owls-tree.tapsellferrier.co.uk with esmtp (Exim 4.30 #1 (Debian)) id 1D8Sgq-00054Y-Uw; Tue, 08 Mar 2005 00:35:12 +0000 Original-Received: from nferrier by kanga with local (Exim 4.44) id 1D8SgV-0000u3-WD; Tue, 08 Mar 2005 00:34:52 +0000 Original-To: bob@rattlesnake.com In-Reply-To: (Robert J. Chassell's message of "Mon, 7 Mar 2005 23:46:52 +0000 (UTC)") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34296 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34296 "Robert J. Chassell" writes: > Jason Rumney rightly noted that > > In the Emacs manual, we need to explain how the user configures > this in Emacs. Describing what RFC2616 says is not very useful > ... > > Good point. How about putting the explanation in a comment in > > emacs/lisp/url/url-vars.el > > just after > > (defvar url-mime-accept-string nil > "String to send to the server in the Accept: field in HTTP requests.") > > ? Or perhaps in the `Commentary:' section of > > emacs/lisp/url/url.el > > with some other remarks, too. (I do not know enough to have any idea > what the `other remarks' should say.) > > > Here is the explanation, slightly changed from before, in a format for > an Emacs Lisp library. Please check this wording. I think it is a > little clearer than before. > > > ;; An `Accept:' or `Accept-Charset' statement, or a `headers' as it is > ;; often called, allows you, a client, to specify the priority or > ;; weighing of the type of statement you would like a server to > ;; accept. > ;; > ;; In contrast to their precedence in English text, commas separate > ;; _bigger_ groupings than semi-colons, which are used to prefix > ;; weightings or priority values. Priority values go from 0.0 to 1.0, > ;; with 1.0 being highest. When a priority or weighting value is not > ;; listed the value is presumed to be 1.0. Moreover, an `Accept:' or > ;; `Accept-Charset' list need not be in priority or precedence order. > ;; > ;; Thus, an accept statement such as > ;; > ;; Accept: text/plain; > ;; q=0.5, text/html, text/x-dvi; > ;; q=0.8, text/x-c > ;; > ;; could be reformatted as > ;; > ;; Accept: text/plain; q=0.5, > ;; text/x-dvi; q=0.8, > ;; text/html ; q=1.0, > ;; text/x-c ; q=1.0 > ;; > ;; This latter expression shows the list in order from lower to higher > ;; priority. Both `text/html' and `text/x-c' are of equal (and > ;; highest) priority. > ;; > ;; When a client sends in an HTTP request for a resource, the above > ;; `Accept:' statement tells the server that the user prefers either > ;; an HTML or text/x-c document. If neither of those reprsentations > ;; is available, then DVI is next preference. If none of those three > ;; are available, then plain text should be sent. If neither plain > ;; text, DVI, HTML nor x-c are available, then the server's response > ;; should indicate that it is failing to find a representation that > ;; satisfies the request. I find this confusing. I understand what you are saying about commas and semi-colons... but I think it is a red herring in terms of better documentation. You seem to be trying to explain the HTTP rfc in an elisp comment. Why can't you just say: ;; An `Accept' or `Accept-Charset' header may be specified in the ;; form described in rfc2616 section 14.1 and 14.2. ;; ;; For example ;; Accept: text/plain; q=0.5, ;; text/html, ;; text/x-dvi; q=0.8, ;; text/x-c Personally, I think it would be better if this was automatic anyway, as was indicated by the doc string in rms' original post. Normally I want Accept-Charset to be sent to an HTTP server based on an automatically computed list from Emacs' available character sets. The ability to configure Accept-Charsets specifically would be a rare requirement and should not be encouraged in elisp programming. Nic