From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Translation of http status code to text Date: Tue, 23 Mar 2010 11:54:40 +0100 Message-ID: References: <87sk7vllgj.fsf@mail.jurta.org> <87hbo81onq.fsf@lifelogs.com> <87k4t4zb5l.fsf@lifelogs.com> <87r5ncxp4z.fsf@lifelogs.com> <87ljdkxj4m.fsf@lifelogs.com> <877hp3ibft.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269342392 7097 80.91.229.12 (23 Mar 2010 11:06:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2010 11:06:32 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 23 12:06:17 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu1vx-0005BU-SI for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 12:06:08 +0100 Original-Received: from localhost ([127.0.0.1]:54752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu1vx-0002Ma-6i for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 07:06:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu1l3-0006nv-PM for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:54:50 -0400 Original-Received: from [140.186.70.92] (port=36719 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu1l1-0006mP-Bi for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:54:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu1kx-0002sl-Ah for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:54:47 -0400 Original-Received: from iwfs.imcode.com ([82.115.149.64]:48702 helo=gate.verona.se) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu1kw-0002sH-R1 for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:54:43 -0400 Original-Received: from localhost.localdomain (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id o2NAsePO008034; Tue, 23 Mar 2010 11:54:40 +0100 In-Reply-To: <877hp3ibft.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 23 Mar 2010 11:54:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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 Xref: news.gmane.org gmane.emacs.devel:122541 Archived-At: Juri Linkov writes: >> SM> The symbol part depends on the rest of the patch: what do you use the >> SM> symbol for? Do you even need it? >> >> I was going to change url-http.el like so, in url-http-parse-headers: >> >> (case url-http-response-status >> ((url-http-code-multiple-choices) ; was 300, uses defconst >> ... >> nil) >> ...) >> >> and I thought generating the defconsts would be best without dynamically >> generating the symbol name as "url-http-code-%s" from the symbol in the >> table. >> >> But instead I can say (url-http-code-number 'multiple-choices). It's >> really a matter of taste. > > Please don't add symbols. Developers prefer to refer to numbers. > > The "number to text" mapping is necessary only to display codes > in a readable form to users. Please re-read Lennart's original > request: > > Is there a list in Emacs for translating http status code to readable > text (like http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)? As a developer I'd like both numbers and symbols. Maybe thats just me. I think this is a bit particular for the http protocol, since some codes are extremely well known, whereas others are not. -- Joakim Verona