* Questions about mail, MIME, etc.
@ 2014-05-08 13:31 Peter Davis
2014-05-08 14:34 ` Eric Abrahamsen
2014-05-10 23:46 ` Peter Davis
0 siblings, 2 replies; 9+ messages in thread
From: Peter Davis @ 2014-05-08 13:31 UTC (permalink / raw
To: emacs-orgmode
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 <http://orgmode.org/worg/org-contrib/org-mime.html>, 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)
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?
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.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-08 13:31 Questions about mail, MIME, etc Peter Davis
@ 2014-05-08 14:34 ` Eric Abrahamsen
2014-05-08 15:31 ` Peter Davis
2014-05-08 16:44 ` Peter Davis
2014-05-10 23:46 ` Peter Davis
1 sibling, 2 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2014-05-08 14:34 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
Peter Davis <pfd@pfdstudio.com> 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 <http://orgmode.org/worg/org-contrib/org-mime.html>, 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Update-org-mime-to-current-export-functions.patch --]
[-- Type: text/x-diff, Size: 1298 bytes --]
From c967afb70bd7c9039c09d7c7f22388e1eced30fa Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-08 14:34 ` Eric Abrahamsen
@ 2014-05-08 15:31 ` Peter Davis
2014-05-08 16:44 ` Peter Davis
1 sibling, 0 replies; 9+ messages in thread
From: Peter Davis @ 2014-05-08 15:31 UTC (permalink / raw
To: emacs-orgmode
On Thu, May 08, 2014 at 10:34:26PM +0800, Eric Abrahamsen wrote:
> Peter Davis <pfd@pfdstudio.com> 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 <http://orgmode.org/worg/org-contrib/org-mime.html>, 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.
Thanks, Eric! I'll give it a try.
> > 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.
Thanks. I suppose I can use gnus to send a message, even if I'm not using it to read mail.
> > 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!
Great!
Thank you.
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-08 14:34 ` Eric Abrahamsen
2014-05-08 15:31 ` Peter Davis
@ 2014-05-08 16:44 ` Peter Davis
2014-05-09 1:45 ` Eric Abrahamsen
1 sibling, 1 reply; 9+ messages in thread
From: Peter Davis @ 2014-05-08 16:44 UTC (permalink / raw
To: Eric Abrahamsen; +Cc: emacs-orgmode
On Thu, May 08, 2014 at 10:34:26PM +0800, Eric Abrahamsen wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
>
> 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.
Excellent! That worked. Thank you!
>
> 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.
Ok, I was able to send the message through gnus, even though I don't (normally) use it as a mail reader.
> > 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!
Almost. It looks like org-mime puts the actual contents of the buffer into the text/plain part, including links, etc. that would normally be hidden on display. I think it would be
more useful to make the text/plain part contain what would be output from exporting to text. But maybe that's just my preference.
Thank you!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-08 16:44 ` Peter Davis
@ 2014-05-09 1:45 ` Eric Abrahamsen
0 siblings, 0 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2014-05-09 1:45 UTC (permalink / raw
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> On Thu, May 08, 2014 at 10:34:26PM +0800, Eric Abrahamsen wrote:
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>> 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.
>
> Excellent! That worked. Thank you!
Okay, I'll start a new thread and see if we can get the patch accepted.
>>
>> 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.
>
> Ok, I was able to send the message through gnus, even though I don't (normally) use it as a mail reader.
>
>> > 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!
>
> Almost. It looks like org-mime puts the actual contents of the buffer
> into the text/plain part, including links, etc. that would normally be
> hidden on display. I think it would be
> more useful to make the text/plain part contain what would be output from exporting to text. But maybe that's just my preference.
org-mime assumes a native 'org export format for the plain text part of
the email. That looks like it's hard-coded in `org-mime-compose',
unfortunately.
Eric
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-08 13:31 Questions about mail, MIME, etc Peter Davis
2014-05-08 14:34 ` Eric Abrahamsen
@ 2014-05-10 23:46 ` Peter Davis
2014-05-11 3:05 ` Eric Abrahamsen
1 sibling, 1 reply; 9+ messages in thread
From: Peter Davis @ 2014-05-10 23:46 UTC (permalink / raw
To: emacs-orgmode
One more follow-on question. When I run org-mime-org-buffer-htmlize, I get a buffer in message mode with a nice MIME message almost ready to
go. I have not specified org-mime-library, so it defaults to mml, as expected for gnus. But when I type C-c C-c to send the message, I get
prompted for "via" with three options (which I don't remember offhand, but it was something like 'transport', 'sendmail' and 'smtp'.
However, if I had previously run and quit gnus in that session, it just sends the message, badda-boom-badda-bing.
Is there some minimal configuration I can add to .emacs to have the effect of running and quitting gnus to messages will send? I realize
this is not so much an org-mode question, but it's related.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-10 23:46 ` Peter Davis
@ 2014-05-11 3:05 ` Eric Abrahamsen
2014-05-11 17:35 ` Peter Davis
0 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2014-05-11 3:05 UTC (permalink / raw
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> One more follow-on question. When I run org-mime-org-buffer-htmlize, I get a buffer in message mode with a nice MIME message almost ready to
> go. I have not specified org-mime-library, so it defaults to mml, as expected for gnus. But when I type C-c C-c to send the message, I get
> prompted for "via" with three options (which I don't remember offhand, but it was something like 'transport', 'sendmail' and 'smtp'.
>
> However, if I had previously run and quit gnus in that session, it just sends the message, badda-boom-badda-bing.
>
> Is there some minimal configuration I can add to .emacs to have the effect of running and quitting gnus to messages will send? I realize
> this is not so much an org-mode question, but it's related.
>
> Thanks!
>
> -pd
I have these variables set, I'll bet it's one or the other that makes
the difference (probably the second).
(setq mail-user-agent 'gnus-user-agent)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-11 3:05 ` Eric Abrahamsen
@ 2014-05-11 17:35 ` Peter Davis
2014-05-12 1:37 ` Eric Abrahamsen
0 siblings, 1 reply; 9+ messages in thread
From: Peter Davis @ 2014-05-11 17:35 UTC (permalink / raw
To: Eric Abrahamsen; +Cc: emacs-orgmode
On Sun, May 11, 2014 at 11:05:30AM +0800, Eric Abrahamsen wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
>
> > One more follow-on question. When I run org-mime-org-buffer-htmlize, I get a buffer in message mode with a nice MIME message almost ready to
> > go. I have not specified org-mime-library, so it defaults to mml, as expected for gnus. But when I type C-c C-c to send the message, I get
> > prompted for "via" with three options (which I don't remember offhand, but it was something like 'transport', 'sendmail' and 'smtp'.
> >
> > However, if I had previously run and quit gnus in that session, it just sends the message, badda-boom-badda-bing.
> >
> > Is there some minimal configuration I can add to .emacs to have the effect of running and quitting gnus to messages will send? I realize
> > this is not so much an org-mode question, but it's related.
>
> I have these variables set, I'll bet it's one or the other that makes
> the difference (probably the second).
>
> (setq mail-user-agent 'gnus-user-agent)
> (setq message-send-mail-function 'message-send-mail-with-sendmail)
>
Ah! Using these lines, or even just the first one, did get rid of the "via:" prompt, but the messages never got delivered, even though emacs
said they had been sent.
Then it occurred to me ... D'oh! I just added
(load-file "~/.gnus.el")
That worked! Sorry for the oversight.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Questions about mail, MIME, etc.
2014-05-11 17:35 ` Peter Davis
@ 2014-05-12 1:37 ` Eric Abrahamsen
0 siblings, 0 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2014-05-12 1:37 UTC (permalink / raw
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> On Sun, May 11, 2014 at 11:05:30AM +0800, Eric Abrahamsen wrote:
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>> > One more follow-on question. When I run org-mime-org-buffer-htmlize, I get a buffer in message mode with a nice MIME message almost ready to
>> > go. I have not specified org-mime-library, so it defaults to mml, as expected for gnus. But when I type C-c C-c to send the message, I get
>> > prompted for "via" with three options (which I don't remember offhand, but it was something like 'transport', 'sendmail' and 'smtp'.
>> >
>> > However, if I had previously run and quit gnus in that session, it just sends the message, badda-boom-badda-bing.
>> >
>> > Is there some minimal configuration I can add to .emacs to have the effect of running and quitting gnus to messages will send? I realize
>> > this is not so much an org-mode question, but it's related.
>>
>> I have these variables set, I'll bet it's one or the other that makes
>> the difference (probably the second).
>>
>> (setq mail-user-agent 'gnus-user-agent)
>> (setq message-send-mail-function 'message-send-mail-with-sendmail)
>>
>
> Ah! Using these lines, or even just the first one, did get rid of the "via:" prompt, but the messages never got delivered, even though emacs
> said they had been sent.
>
> Then it occurred to me ... D'oh! I just added
>
> (load-file "~/.gnus.el")
>
> That worked! Sorry for the oversight.
Glad you've got it working!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-12 1:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-08 13:31 Questions about mail, MIME, etc Peter Davis
2014-05-08 14:34 ` Eric Abrahamsen
2014-05-08 15:31 ` Peter Davis
2014-05-08 16:44 ` Peter Davis
2014-05-09 1:45 ` Eric Abrahamsen
2014-05-10 23:46 ` Peter Davis
2014-05-11 3:05 ` Eric Abrahamsen
2014-05-11 17:35 ` Peter Davis
2014-05-12 1:37 ` Eric Abrahamsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.