[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mail-add-attachment
From: |
Stefan Monnier |
Subject: |
Re: mail-add-attachment |
Date: |
Fri, 09 Sep 2011 10:32:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Is it okay to install this command at this time? I know we're in a
> feature freeze, but the new command is actually a very thin wrapper
> around code we already use elsewhere (gnus-dired.el and mml.el). The
> result will be that users of sendmail.el will be able to send MIME
> attachments. Here's the patch:
I guess it could be OK.
I have a few comments, tho:
> +(autoload 'mml-attach-file "mml"
> + "Attach a file to the outgoing MIME message.
> +The file is not inserted or encoded until you send the message with
> +`\\[message-send-and-exit]' or `\\[message-send]'.
> +
> +FILE is the name of the file to attach. TYPE is its
> +content-type, a string of the form \"type/subtype\". DESCRIPTION
> +is a one-line description of the attachment. The DISPOSITION
> +specifies how the attachment is intended to be displayed. It can
> +be either \"inline\" (displayed automatically within the message
> +body) or \"attachment\" (separate from the body).")
> +
> +(autoload 'mm-default-file-encoding "mm-encode"
> + "Return the default encoding for FILE.")
I must say I don't like such manually-managed autoloads. I'd rather use
a declare-function plus an explicit require call. My favorite would be
to use a new require-autoload construct which the byte-compiler would
replace by autoloads of the functions actually called (so the
byte-compiler would manage the list of autoloads rather than doing it by
hand).
> +\\[mail-attach-file] insert a text file into the message.
> +\\[mail-add-attachment] add to the message a file as a MIME attachment.
I think mail-attach-file needs to be renamed to mail-insert-file.
Stefan