From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: Sending attachments Date: Wed, 08 Jul 2009 21:08:01 +0200 Message-ID: <87eisr56y6.fsf@marauder.physik.uni-ulm.de> References: <87k52rzyn1.fsf@benthic.rattlesnake.com> <873a9fw6dt.fsf@catnip.gol.com> <87y6r7yp1y.fsf@stupidchicken.com> <87ljn1dcc4.fsf@stupidchicken.com> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247080263 17520 80.91.229.12 (8 Jul 2009 19:11:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2009 19:11:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 21:10:56 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 1MOcXf-0006cf-Ba for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 21:10:56 +0200 Original-Received: from localhost ([127.0.0.1]:59624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOcXe-0004OF-MQ for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 15:10:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOcV7-0001oi-0B for emacs-devel@gnu.org; Wed, 08 Jul 2009 15:08:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOcV2-0001hJ-1g for emacs-devel@gnu.org; Wed, 08 Jul 2009 15:08:16 -0400 Original-Received: from [199.232.76.173] (port=45613 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOcV1-0001gh-Ni for emacs-devel@gnu.org; Wed, 08 Jul 2009 15:08:11 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]:54497) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MOcUw-0004w0-7z; Wed, 08 Jul 2009 15:08:06 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.175]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id n68J83xO021381; Wed, 8 Jul 2009 21:08:03 +0200 (MEST) Original-Received: from localhost (localhost [127.0.0.1]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 8964B1391B; Wed, 8 Jul 2009 21:08:03 +0200 (CEST) X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ 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:112190 Archived-At: On Wed, Jul 08 2009, Richard Stallman wrote: > As does MML (mml-attach-file). > > It isn't in the emacs-mime manual so I did not know about it. It is documented in the Message manual: ,----[ (info "(message)MIME") ] | The most typical thing users want to use the multipart things in | MIME for is to add "attachments" to mail they send out. This can be | done with the `C-c C-a' command (`M-x mml-attach-file'), which will | prompt for a file name and a MIME type. | | If your Emacs supports drag and drop, you can also drop the file in | the Message buffer. [...] `---- > I tried it just now. It asked me a lot of questions and then > inserted this text. > > <#part type="text/x-sh" filename="~/foo.sh" disposition=inline description=foo> > <#/part> > > I suppose this is MML and needs to get converted later. > However, when I sent the message with C-c C-c, it did not convert. > I don't see that it set up any hook to do so. message-mode does the conversion automatically ,----[ (info "(message)MIME") ] | Message is a MIME-compliant posting agent. The user generally doesn't | have to do anything to make the MIME happen--Message will automatically | add the `Content-Type' and `Content-Transfer-Encoding' headers. `---- > After a lot of searching thru that manual I found the function > mml-to-mime. Well, it under Composing -> Conversion, which seem quite suitable to me. ,----[ (info "(emacs-mime)Conversion") ] | An MML message can be converted back to MIME by the `mml-to-mime' | function. `---- message-mode uses mml-generate-mime, though: ,----[ (info "(emacs-mime)Composing") ] | The main interface function is `mml-generate-mime'. It will examine | the contents of the current (narrowed-to) buffer and return a string | containing the MIME message. `---- > If mml-to-mime were put on a hook so that C-c C-c would call it, this > feature would be usable. A suitable front-end to mml-attach-file > could avoid asking all the annoying questions. mml-attach-file is the front-end used in message-mode for many years. I quite often adjust type and disposition (inline vs. attachment). I don't recall any complains about the questions from our users. Just hit RET if you are happy with. > It would only be necessary to document it. > > However, that hook could also cause trouble, since it might > trigger by accident when users did not intend it. It quite unlikely that users insert MML markup by accident. When writing about it, there is `mml-quote-region'. > Another drawback, compared with etach-detach, is that you don't see > what is really going to appear in the message. C-u M-x mml-preview RET, M-x mml-preview RET ,----[ f mml-preview RET ] | mml-preview is an interactive compiled Lisp function in `mml.el'. | It is bound to , C-c RET P. | (mml-preview &optional RAW) | | Display current buffer with Gnus, in a new buffer. | If RAW, display a raw encoded MIME message. `---- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/