From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68757 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: rfc2047.el dependencies on mm-util.el (was: Sending attachments) Date: Sun, 19 Jul 2009 00:36:49 -0400 Message-ID: References: <87eisjjrsc.fsf@uwakimon.sk.tsukuba.ac.jp> <87iqhsr8jm.fsf@lifelogs.com> <87my73kwxc.fsf@lifelogs.com> <87eisdol9i.fsf_-_@marauder.physik.uni-ulm.de> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1247978232 6470 80.91.229.12 (19 Jul 2009 04:37:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2009 04:37:12 +0000 (UTC) Cc: tzz@lifelogs.com, ding@gnus.org, emacs-devel@gnu.org To: Reiner Steib Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 19 06:37:05 2009 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.50) id 1MSO92-00071B-Ao for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2009 06:37:04 +0200 Original-Received: from localhost ([127.0.0.1]:50324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSO91-0006DR-Js for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2009 00:37:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSO8y-0006DM-1w for emacs-devel@gnu.org; Sun, 19 Jul 2009 00:37:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSO8t-00069o-Fx for emacs-devel@gnu.org; Sun, 19 Jul 2009 00:36:59 -0400 Original-Received: from [199.232.76.173] (port=47665 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSO8t-00069f-D5 for emacs-devel@gnu.org; Sun, 19 Jul 2009 00:36:55 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:37253) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSO8t-0006FE-32 for emacs-devel@gnu.org; Sun, 19 Jul 2009 00:36:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MSO8n-0002px-OE; Sun, 19 Jul 2009 00:36:49 -0400 In-reply-to: <87eisdol9i.fsf_-_@marauder.physik.uni-ulm.de> (message from Reiner Steib on Sat, 18 Jul 2009 21:15:37 +0200) X-detected-operating-system: by monty-python.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:112723 gmane.emacs.gnus.general:68757 Archived-At: > 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.