From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Questions about mail, MIME, etc. Date: Thu, 08 May 2014 22:34:26 +0800 Message-ID: <87bnv8730t.fsf@ericabrahamsen.net> References: <20140508133125.GA20746@pdavismbp15.iscinternal.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiPMA-0004OU-RG for emacs-orgmode@gnu.org; Thu, 08 May 2014 10:31:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiPM5-0001Hy-J2 for emacs-orgmode@gnu.org; Thu, 08 May 2014 10:31:30 -0400 Received: from plane.gmane.org ([80.91.229.3]:59264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiPM5-0001Hr-Dc for emacs-orgmode@gnu.org; Thu, 08 May 2014 10:31:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WiPM0-0000pc-Ni for emacs-orgmode@gnu.org; Thu, 08 May 2014 16:31:20 +0200 Received: from 114.248.31.91 ([114.248.31.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2014 16:31:20 +0200 Received: from eric by 114.248.31.91 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2014 16:31:20 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Peter Davis writes: > I'd love to get mail working so I could send MIME messages right from org mode. However, I have a couple of issues/questions: > > 1) I tried using org-mime , but when I try the command org-mime-org-buffer-htmlize, I get the error: > Symbol's function definition is void: org-export-grab-title-from-buffer > I think I followed the setup described on that page. Is this meant for an older version of orgmode? (I'm running 8.2.5g) Yeah I got that error too, a while ago, and your message prompted me to look at it. It seems like org-mime is just a bit behind the state of org-export, and fixing that one dead function link is enough to make it work again. I've attached a patch. > 2) I actually use a number of email programs (MH, mutt, etc.), but not gnus or VM. Is there a way to get org to export the mime to a message file that I can send (as a message, > not as an attachment) from some other program? Generating a message buffer is pretty much hard-coded into org-mime. Once you're in that buffer, though, the (non-interactive) function mml-generate-mime will return the fully encoded mime message as a string -- you could save that to a file and do something else with it. I'm not 100% confident that's the simplest way to do that. > 3) What I'd really like is a multipart/alternative message where one part is text/plain, and looks exactly like the emacs buffer display, and the other part is text/html, and > looks like what org would export to html, complete with tables, images, etc. As far as I know, that's exactly what org-mime does! HTH, Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Update-org-mime-to-current-export-functions.patch >From c967afb70bd7c9039c09d7c7f22388e1eced30fa Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 8 May 2014 22:32:01 +0800 Subject: [PATCH] Update org-mime to current export functions * /contrib/lisp/org-mime.el (org-mime-send-buffer): This function was using `org-export-grab-title-from-buffer', which no longer exists. --- contrib/lisp/org-mime.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el index b0007ac..5f874d9 100644 --- a/contrib/lisp/org-mime.el +++ b/contrib/lisp/org-mime.el @@ -269,8 +269,10 @@ export that region, otherwise export the entire body." (defun org-mime-send-buffer (&optional fmt) (run-hooks 'org-mime-send-buffer-hook) (let* ((region-p (org-region-active-p)) - (subject (org-export-grab-title-from-buffer)) - (file (buffer-file-name (current-buffer))) + (file (buffer-file-name (current-buffer))) + (subject (if (not file) (buffer-name (buffer-base-buffer)) + (file-name-sans-extension + (file-name-nondirectory file)))) (body-start (or (and region-p (region-beginning)) (save-excursion (goto-char (point-min))))) (body-end (or (and region-p (region-end)) (point-max))) -- 1.9.2 --=-=-=--