From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Translation of http status code to text Date: Tue, 23 Mar 2010 11:54:18 +0200 Organization: JURTA Message-ID: <877hp3ibft.fsf@mail.jurta.org> References: <87sk7vllgj.fsf@mail.jurta.org> <87hbo81onq.fsf@lifelogs.com> <87k4t4zb5l.fsf@lifelogs.com> <87r5ncxp4z.fsf@lifelogs.com> <87ljdkxj4m.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269340684 1087 80.91.229.12 (23 Mar 2010 10:38:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2010 10:38:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 23 11:37:58 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 1Nu1Ui-0000Ph-KU for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 11:37:56 +0100 Original-Received: from localhost ([127.0.0.1]:56513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu1Ue-0000p1-8g for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 06:37:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu1Ll-0004O4-G7 for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:28:41 -0400 Original-Received: from [140.186.70.92] (port=56971 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu1Lj-0004NG-I8 for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:28:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu1Lg-0007pd-S3 for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:28:39 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:56024 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu1Lg-0007pO-JS for emacs-devel@gnu.org; Tue, 23 Mar 2010 06:28:36 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.30.14.cable.starman.ee [82.131.30.14]) by mx1.starman.ee (Postfix) with ESMTP id 45EDB3F4058; Tue, 23 Mar 2010 12:28:29 +0200 (EET) In-Reply-To: <87ljdkxj4m.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 22 Mar 2010 14:15:53 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:122540 Archived-At: > 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)? -- Juri Linkov http://www.jurta.org/emacs/