emacs-devel
[Top][All Lists]
Advanced

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

Reducing Gnus dependencies in message.el (was: Sending attachments)


From: Reiner Steib
Subject: Reducing Gnus dependencies in message.el (was: Sending attachments)
Date: Wed, 15 Jul 2009 23:51:56 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux)

On Sat, Jul 04 2009, Richard Stallman wrote:

>     > I object strenuously to the idea of replacing the very simple Mail
>     > mode with something complex from Gnus.
>
>     It's a question of necessary complexity.
>
> I don't think so.  Look at all the libraries message.el loads.
>
>
>     (require 'hashcash)
>     (require 'canlock)

We can eliminate these by using autoloads.  canlock is used for news
postings in Gnus by default.  Hashcash is an optional feature for
mail.

>     (require 'mailheader)

[mailheader.el is not part of Gnus, but part of Emacs.]  Required to
insert correctly formated (quoting, folding, ...) headers into mail
message buffers.

;;; mailheader.el --- mail header parsing, merging, formatting
[...]
;;; Commentary:

;; This package provides an abstraction to RFC822-style messages, used in
;; mail, news, and some other systems.  The simple syntactic rules for such
;; headers, such as quoting and line folding, are routinely reimplemented
;; in many individual packages.  This package removes the need for this
;; redundancy [...]

>     (require 'gmm-utils)

;;; gmm-utils.el --- Utility functions for Gnus, Message and MML

... is an attempt to reduce Gnus dependencies from Message and MML
files.

>     (require 'nnheader)
>
>       That loads
>       (require 'mail-utils)

[mailutils.el is not part of Gnus, but part of Emacs].  It provides
utility functions for mail handling.  Both, rmail.el and sendmail.el
use it.  I see no point in avoiding using it.

;;; mail-utils.el --- utility functions used both by rmail and rnews
[...]
;; Utility functions for mail and netnews handling.  These handle fine
;; points of header parsing.

>       (require 'mm-util)

;;; mm-util.el --- Utility functions for Mule and low level things
... needed for MIME.

>       (require 'gnus-util)

I will try to eliminate this dependency.

>     ;; This is apparently necessary even though things are autoloaded.
>     ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
>     ;; require mailabbrev here.
>     (if (featurep 'xemacs)
>       (require 'mail-abbrevs)
>       (require 'mailabbrev))

Handling expansions of mail aliases.

>     (require 'mail-parse)

For parsing and encoding headers and body correctly.

>     (require 'mml)

Required for MIME handling (e.g. sending attachments).

>     (require 'rfc822)

[rfc822.el is not part of Gnus, but part of Emacs.]  Uses to ensure that
address headers are RFC822-compliant.  Is also used in rmail.el.

>     (require 'ecomplete)

We can eliminate these by using autoloads.  ecomplete is optional.

> I don't want to replace the simple sendmail.el with this tremendous
> pile of complexity.
>
> message.el is also 8000 lines long, where sendmail.el is under 2000
> lines.  I expect that sending attachments won't require more than 200
> lines.

Doing all aspects of MIME mostly correct is not quite simple.  Many
MUAs (Mail User Agent) have severe bugs WRT this.  When reading about
non-trivial topics in the relevant newsgroups, most of the time only
mutt and Gnus do the right thing.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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