unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Robert J. Chassell" <bob@rattlesnake.com>
Subject: Re: Do you understand this?
Date: Tue, 8 Mar 2005 18:41:46 +0000 (UTC)	[thread overview]
Message-ID: <m1D8jeM-0004RIC@rattlesnake.com> (raw)
In-Reply-To: <87hdjnotzo.fsf@tapsellferrier.co.uk> (message from Nic Ferrier on Tue, 08 Mar 2005 00:34:51 +0000)

Regarding HTTP/1.1 Accept: and Accept-Charset: statements, Nic Ferrier
wrote

   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.

At the very least, some comment in the Emacs Lisp sources should tell
people that

    ;; In contrast to their precedence in English text, commas
    ;; separate _bigger_ groupings than semi-colons, which are used to
    ;; prefix weightings or priority values.

Sections 14.1 and 14.2 of rfc2616 only list semi-colons in the BNF.
The reverse English language convention is so strong that the protocol
specification ought to be mentioned in another part of the RFC; and
since it is not, in an Emacs comment.

While we are mentioning the precedence convention, we might as well
add the rest:

    ;; 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.

You ask

   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.

That is fine, in addition to the segment above.

In addition it is worth stating that

    ;;      Accept: text/plain; q=0.5,
    ;;              text/html,
    ;;              text/x-dvi; q=0.8,
    ;;              text/x-c

can 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 will make understanding easier for the person who comes on all
this in 10 or 20 years.

   Normally I want Accept-Charset to be sent to an HTTP server based
   on an automatically computed list from Emacs' available character
   sets.

Yes -- that is a good reason to put comments in the relevant source.

-- 
    Robert J. Chassell                         
    bob@rattlesnake.com                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc

  reply	other threads:[~2005-03-08 18:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-06 19:11 Do you understand this? Richard Stallman
2005-03-06 20:44 ` Nic Ferrier
2005-03-06 22:32   ` Robert J. Chassell
2005-03-06 22:58     ` Andreas Schwab
2005-03-06 23:05     ` Jason Rumney
2005-03-07 15:37       ` Robert J. Chassell
2005-03-07 17:10         ` Jason Rumney
2005-03-07 23:46           ` Robert J. Chassell
2005-03-08  0:34             ` Nic Ferrier
2005-03-08 18:41               ` Robert J. Chassell [this message]
2005-03-09 16:58                 ` Richard Stallman
2005-03-06 23:12     ` Nic Ferrier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1D8jeM-0004RIC@rattlesnake.com \
    --to=bob@rattlesnake.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).