From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ethan Ligon Subject: Re: Email from org? Date: Sat, 31 Jul 2010 01:25:59 +0000 (UTC) Message-ID: References: <8739v6dlss.fsf@gmail.com> <87aap84qf6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=42879 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Of0q4-0001Zx-Un for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 21:26:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Of0q3-00014e-MQ for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 21:26:12 -0400 Received: from lo.gmane.org ([80.91.229.12]:50122) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Of0q3-00014K-9N for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 21:26:11 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Of0py-0004EA-Oy for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 03:26:07 +0200 Received: from c-24-5-193-224.hsd1.ca.comcast.net ([24.5.193.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Jul 2010 03:26:06 +0200 Received: from ligon by c-24-5-193-224.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Jul 2010 03:26:06 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Eric Schulte gmail.com> writes: > The following function might get part way towards what you describe. > > --8<---------------cut here---------------start------------->8--- > (defun org-send-email-of-headline () > (interactive) > (let ((subject (org-get-heading t)) > (to (org-entry-get (point) "mailto"))) > (outline-mark-subtree) > (org-mime-org-buffer-htmlize) > (save-excursion > (message-goto-to) (insert to) > (message-goto-subject) (insert subject)))) > --8<---------------cut here---------------end--------------->8--- > Indeed! This gets me very close to what I had in mind. Aside from saying thanks, I have two related things to say: 1) The code snippet above (really org-mime-org-buffer-htmlize) produces output which is either designed to be further processed by the mml library (mml-generate-mime) for gnus users or by the semi library for wanderlust users. Thus, the buffer resulting from the above code-snippet is still one step away from being something one could feed to smtpmail, and makes the output one needs to get from org-mime dependent on an MUA (gnus or wanderlust). 2) I don't see the reason for this dependence. Forget what mail client the user prefers, whether gnus or wanderlust or something else. Why not just feed the output of org-mime to a scratch buffer, run (mml-generate-mime) on that, stick the output in a message buffer, build a header, and then run smtpmail-send-it? 3) Okay, I see one reason for the dependence: I guess that mml isn't part of the base emacs distribution. 4) And I see another reason: if one wanted to edit the htmlized buffer it might be a little more convenient to work with the semi or mml representations instead of the mime. But (3) and (4) seem weak to me. What am I missing? -Ethan