unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Evil Boris <evilborisnet@netscape.net>
Subject: Re: automatic MIME decoding in rmail
Date: Sun, 09 Apr 2006 17:32:18 -0400	[thread overview]
Message-ID: <uodza8mfx.fsf@boris.laptop> (raw)
In-Reply-To: E1FOJww-0005rM-FS@fencepost.gnu.org


> Stefan Monnier  writes:
>     As far as I know, it's is prefectly valid to add any random number of
>     arbitrary non-standard args.  So "format=[a-z]+" is too restrictive.

The RFC (3676) that defines format=fixed or format=flowed also
mentions delsp=yes or delsp=no.  Looking around, but not too
carefully, I have not found any other allowed arguments, for
text/plain.

I think there are two alternatives.  One is to try and enumerate the
allowed args explicitly (please do not forget to surround the
argument values with optional quotes, as they are commonly used, e.g.,
allowing both format=flowed and format="flowed".  (I.e., modify
Richard's expression by allowing quotes and delsp=... .)

Alternatively, some sensible expression that would match a general set
of arguments such as what Stefan suggests.

I tried the first alternative with expression:

 (concat "^content-type:[ ]*text/plain;\\(?:[ \t\n]*format=\"?[a-z]+\"?;\\)?"
                 "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?")

and had no trouble so far, though I receive very few msgs in this
format and perhaps the regex only got exercised once or twice for the
class of msgs we are discussing.  A more general expression including
delsp would look something like this:

 (concat "^content-type:[ ]*text/plain;"
         "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[a-z]+\"?;\\)?"
         "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?")

One could imagine even specifying the two legal values for formal and
delsp, but this seems like overkill...

Should one of the above versions be incorporated in CVS?  If it already
has been, my apologies...

     --Boris

  reply	other threads:[~2006-04-09 21:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-23 16:32 automatic MIME decoding in rmail Evil Boris
2006-03-26  0:21 ` Richard Stallman
2006-03-27 23:18   ` Stefan Monnier
2006-03-28 19:33     ` Richard Stallman
2006-04-09 21:32       ` Evil Boris [this message]
2006-04-10  3:26         ` Richard Stallman
2006-05-06  0:05           ` Evil Boris
2006-05-06 23:36             ` Richard Stallman
2006-05-16 14:55               ` Evil Boris

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=uodza8mfx.fsf@boris.laptop \
    --to=evilborisnet@netscape.net \
    /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).