[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rfc2047.el dependencies on mm-util.el (was: Sending attachments)

From: Richard Stallman
Subject: Re: rfc2047.el dependencies on mm-util.el (was: Sending attachments)
Date: Sun, 19 Jul 2009 00:36:49 -0400

    > rfc2047.el depends on some substantial code in mm-util.el:
    > mm-charset-to-coding-system and mm-find-mime-charset-region.  I cannot
    > understand that code, and I am not sure what it is trying to do.  I
    > understand the doc strings, but they explain only in vague terms.

    Please elaborate what is not clear...

If only a piece of it were unclear, that would be a reasonable question.
However, the problem is that I can't even begin to understand most
of those functions.  The necessary info is not present.

    MIME charsets are not the same as (Emacs) coding systems.  This
    function does the mapping and also handles overrides (many MUAs
    specify wrong charsets), invalid charsets, etc.

That is just the beginning of the necessary explanation for
understanding what this code does.  To state the purpose in general
terms like this is not enough.

To make the code clear means explaining the specifics of what it does.
Each group of a few lines needs comments to explain why those lines
are there.  Lots of background information needs to be provided.

    rfc2047.el implements (one of) the MIME standards.  mm-utils.el
    contains utility functions for MIME.  I.e. they are closely related.

Only part of mm-utils.el is closely related to rfc2047.el.  That part
is what I am talking about here.  It consists of the two functions
mm-find-mime-charset-region and mm-charset-to-coding-system, and their
subroutines and data.

    I'm not sure it is worth to separate out parts of it.

I don't think you and I are talking about the same "it".  The things
you think I want to separate, actually I want to keep together.

I am going to move rfc20457.el outside Gnus to make it a regular part
of Emacs.

What I want to do is keep the two functions
mm-find-mime-charset-region and mm-charset-to-coding-system (and their
subroutines and data) together with rfc2047.el, making them too a
regular part of Emacs.  This requires separating them from the rest of
mm-utils.el which will remain inside Gnus.  It also requires making
them clean and understandable.

I am asking Gnus developers to help me by do this by splitting mm-utils
and cleaning up this part.

If I have to do this on my own, then since I can't understand all the
code of these functions, I will have to delete parts of the code until
I can understand what remains.  Some features will be lost, but at
least it will be clear and maintainable.  Whatever features I had to
discard could be re-added later if someone can write them cleanly.

However, if you help, maybe we can achieve a better outcome in which
we get clean code that implements all the existing features of
mm-charset-to-coding-system and mm-find-mime-charset-region, and thus
have no inconvenience for anyone.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]