emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* replying to emai with org-mode syntax in mu4e
@ 2016-10-28 23:19 Matt Price
  2016-10-28 23:48 ` Thibault Marin
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Price @ 2016-10-28 23:19 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

I've just switched to mu4e. It's unbelievably great, thank you everyone
who's recommended it over the years.

However, I would like to compose my replies in org-mode and send them out
as HTML.  I guess the older tools for doing this are officially deprecated.
Nonetheless, does anyone use them? Would you be willing to share your
workflow, and thoughts about what pain points you still have?? I see John
K. has written some cool posts about, e.g., sending headings out, but not
about org-ifying the compose buffer.

Thank you!
Matt

[-- Attachment #2: Type: text/html, Size: 622 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-10-28 23:19 replying to emai with org-mode syntax in mu4e Matt Price
@ 2016-10-28 23:48 ` Thibault Marin
  2016-10-29  1:17   ` Matt Price
  2016-10-29  1:54   ` Matt Price
  0 siblings, 2 replies; 9+ messages in thread
From: Thibault Marin @ 2016-10-28 23:48 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode


It looks like you may be looking for `org-mu4e-compose-org-mode'.

Matt Price writes:

> I've just switched to mu4e. It's unbelievably great, thank you everyone
> who's recommended it over the years.
>
> However, I would like to compose my replies in org-mode and send them out
> as HTML.  I guess the older tools for doing this are officially deprecated.
> Nonetheless, does anyone use them? Would you be willing to share your
> workflow, and thoughts about what pain points you still have?? I see John
> K. has written some cool posts about, e.g., sending headings out, but not
> about org-ifying the compose buffer.
>
> Thank you!
> Matt

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-10-28 23:48 ` Thibault Marin
@ 2016-10-29  1:17   ` Matt Price
  2016-10-29  2:26     ` Thibault Marin
  2016-10-29  1:54   ` Matt Price
  1 sibling, 1 reply; 9+ messages in thread
From: Matt Price @ 2016-10-29  1:17 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

On Fri, Oct 28, 2016 at 7:48 PM, Thibault Marin <thibault.marin@gmx.com>
wrote:

>
> It looks like you may be looking for `org-mu4e-compose-org-mode'.
>

....  duh...

Thank you. So, if I want this to be on by default, do you happen to know
where I should add a hook?

Really appreciate the help,
m

[-- Attachment #2: Type: text/html, Size: 705 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-10-28 23:48 ` Thibault Marin
  2016-10-29  1:17   ` Matt Price
@ 2016-10-29  1:54   ` Matt Price
  2016-10-29 18:38     ` John Kitchin
  1 sibling, 1 reply; 9+ messages in thread
From: Matt Price @ 2016-10-29  1:54 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

On Fri, Oct 28, 2016 at 7:48 PM, Thibault Marin <thibault.marin@gmx.com>
wrote:

>
> It looks like you may be looking for `org-mu4e-compose-org-mode'.
>
> Hmm, just tested it, andthe message I sent didn't seem to get ocnverted to
html. And I found this on github:

https://github.com/djcb/mu/issues/392

[-- Attachment #2: Type: text/html, Size: 773 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-10-29  1:17   ` Matt Price
@ 2016-10-29  2:26     ` Thibault Marin
  0 siblings, 0 replies; 9+ messages in thread
From: Thibault Marin @ 2016-10-29  2:26 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode


I believe you can add a hook to `'mu4e-compose-mode-hook'.

something like the following (not tested) may work:

(add-hook 'mu4e-compose-mode-hook
          (defun do-compose-stuff ()
              "My settings for message composition."
              (org-mu4e-compose-org-mode)))

Matt Price writes:

> On Fri, Oct 28, 2016 at 7:48 PM, Thibault Marin <thibault.marin@gmx.com>
> wrote:
>
>>
>> It looks like you may be looking for `org-mu4e-compose-org-mode'.
>>
>
> ....  duh...
>
> Thank you. So, if I want this to be on by default, do you happen to know
> where I should add a hook?
>
> Really appreciate the help,
> m

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-10-29  1:54   ` Matt Price
@ 2016-10-29 18:38     ` John Kitchin
       [not found]       ` <CAN_Dec_751WGJJGmV8WxFx7PWErPuoVBSWE2vOO4d2aFnBiS=g@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: John Kitchin @ 2016-10-29 18:38 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

You might like this post:
http://kitchingroup.cheme.cmu.edu/blog/2016/10/29/Sending-html-emails-from-org-mode-with-org-mime/

I also sent it to the mailist, using the code as an html mail. I have
not seen it yet though, so if it doesn't make it through (being html and
all ;) You can check out the post.

Matt Price writes:

> On Fri, Oct 28, 2016 at 7:48 PM, Thibault Marin <thibault.marin@gmx.com>
> wrote:
>
>>
>> It looks like you may be looking for `org-mu4e-compose-org-mode'.
>>
>> Hmm, just tested it, andthe message I sent didn't seem to get ocnverted to
> html. And I found this on github:
>
> https://github.com/djcb/mu/issues/392


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
       [not found]                   ` <CAN_Dec_zvD2X0J9DE7p5vBPDc9Pf=8bU5RimHy3qmTMc-9Gk6A@mail.gmail.com>
@ 2016-11-17 18:10                     ` Matt Price
  2016-11-18  1:42                       ` Matt Price
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Price @ 2016-11-17 18:10 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]

Hey everyone, I am definitely still seeing this problem; I just sent a new
email to the mu list to see if anyone there has the same issue. Google
groups link is here:
https://groups.google.com/forum/#!topic/mu-discuss/Hvl9wzI01DA

if you are able to reproduce or can see immediate errors in my ocnfig I'd
be grateful to hear about it.
Thanks!

On Tue, Nov 1, 2016 at 2:13 PM, Matt Price <moptop99@gmail.com> wrote:

> OK, I will try -- doesn't immediatley seem to work but I may have some
> crud kicking around my config that I need to get rid of.
>
> With both your orgmime and the standard library, htmlize-and-send works
> perfectly well when run from the headers. When run form the message body,
> sending fails with "Already sent by mail. Resend?" and drops me back into
> the buffer if I say "n". If I say "y", the send and save both fail. If I
> say "n", and go bak to the headers & execute C-c, sending now succeeds.
>
> No time to track down rihgt now but frustrating for sure!!
>
>
> On Tue, Nov 1, 2016 at 12:17 PM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
>
>> you could try my adapted version here:
>> https://github.com/jkitchin/scimax/blob/master/org-mime.el
>>
>> Matt Price writes:
>>
>> > On Mon, Oct 31, 2016 at 1:05 PM, John Kitchin <jkitchin@andrew.cmu.edu>
>> > wrote:
>> >
>> >> I got that too for a while. Then it seemed to go away.
>> >
>> >
>> > If only I could copy-paste that part of your code ("seemed to go
>> away...")!
>> > Is pretty persistent for me.  Odldy, the first email I send in a new
>> emas
>> > seems to go out fine, and ot save fine in myu sent folder; after that I
>> get
>> > that error. Message sends if I hit C-c C-c again from the headers
>> section
>> > of the htmlized buffer. So, not a atastrophe, but not especially
>> > streamlined either.
>>
>>
>> --
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3489 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-11-17 18:10                     ` Matt Price
@ 2016-11-18  1:42                       ` Matt Price
  2016-11-18  5:12                         ` Matt Price
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Price @ 2016-11-18  1:42 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2821 bytes --]

On Thu, Nov 17, 2016 at 1:10 PM, Matt Price <moptop99@gmail.com> wrote:

> Hey everyone, I am definitely still seeing this problem; I just sent a new
> email to the mu list to see if anyone there has the same issue. Google
> groups link is here:
> https://groups.google.com/forum/#!topic/mu-discuss/Hvl9wzI01DA
>

In case, at some point, someone else starts seeing the same problem, I seem
to have fixed it.  There appears to be some kind of bad chemistry between
recent org-mode, recent mu4e, and message mode.  The trick for me was
making sure that org-mu4e-compose-org-mode was switched off before
message-send-and-exit ran:

(defun htmlize-and-send ()
  "When in an org-mu4e-compose-org-mode message, htmlize and send it."
  (interactive)
  (when (member 'org~mu4e-mime-switch-headers-or-body post-command-hook)
    (org-mime-htmlize)
    (org-mu4e-compose-org-mode)
    (message-send-and-exit)))

The second-to-last line is my only change.

Matt



>
> if you are able to reproduce or can see immediate errors in my ocnfig I'd
> be grateful to hear about it.
> Thanks!
>
> On Tue, Nov 1, 2016 at 2:13 PM, Matt Price <moptop99@gmail.com> wrote:
>
>> OK, I will try -- doesn't immediatley seem to work but I may have some
>> crud kicking around my config that I need to get rid of.
>>
>> With both your orgmime and the standard library, htmlize-and-send works
>> perfectly well when run from the headers. When run form the message body,
>> sending fails with "Already sent by mail. Resend?" and drops me back into
>> the buffer if I say "n". If I say "y", the send and save both fail. If I
>> say "n", and go bak to the headers & execute C-c, sending now succeeds.
>>
>> No time to track down rihgt now but frustrating for sure!!
>>
>>
>> On Tue, Nov 1, 2016 at 12:17 PM, John Kitchin <jkitchin@andrew.cmu.edu>
>> wrote:
>>
>>> you could try my adapted version here:
>>> https://github.com/jkitchin/scimax/blob/master/org-mime.el
>>>
>>> Matt Price writes:
>>>
>>> > On Mon, Oct 31, 2016 at 1:05 PM, John Kitchin <jkitchin@andrew.cmu.edu
>>> >
>>> > wrote:
>>> >
>>> >> I got that too for a while. Then it seemed to go away.
>>> >
>>> >
>>> > If only I could copy-paste that part of your code ("seemed to go
>>> away...")!
>>> > Is pretty persistent for me.  Odldy, the first email I send in a new
>>> emas
>>> > seems to go out fine, and ot save fine in myu sent folder; after that
>>> I get
>>> > that error. Message sends if I hit C-c C-c again from the headers
>>> section
>>> > of the htmlized buffer. So, not a atastrophe, but not especially
>>> > streamlined either.
>>>
>>>
>>> --
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 5142 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: replying to emai with org-mode syntax in mu4e
  2016-11-18  1:42                       ` Matt Price
@ 2016-11-18  5:12                         ` Matt Price
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Price @ 2016-11-18  5:12 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 3407 bytes --]

one last thing:

I had some further trouble when I tried to turn on
org-mu4e-compose-org-mode as a hook to mu4e-compose-mode. I'm pretty sure
there's some kind of a loop related to the funky post-command-hook-setting
internal function org~mu4e-mime-switch-headers-or-body. Anyway, turning off
hte hook and applying the above hook fixed my issue.  Added a couple of
keybindings and now everything works!

On Thu, Nov 17, 2016 at 8:42 PM, Matt Price <moptop99@gmail.com> wrote:

>
>
> On Thu, Nov 17, 2016 at 1:10 PM, Matt Price <moptop99@gmail.com> wrote:
>
>> Hey everyone, I am definitely still seeing this problem; I just sent a
>> new email to the mu list to see if anyone there has the same issue. Google
>> groups link is here:
>> https://groups.google.com/forum/#!topic/mu-discuss/Hvl9wzI01DA
>>
>
> In case, at some point, someone else starts seeing the same problem, I
> seem to have fixed it.  There appears to be some kind of bad chemistry
> between  recent org-mode, recent mu4e, and message mode.  The trick for me
> was making sure that org-mu4e-compose-org-mode was switched off before
> message-send-and-exit ran:
>
> (defun htmlize-and-send ()
>   "When in an org-mu4e-compose-org-mode message, htmlize and send it."
>   (interactive)
>   (when (member 'org~mu4e-mime-switch-headers-or-body post-command-hook)
>     (org-mime-htmlize)
>     (org-mu4e-compose-org-mode)
>     (message-send-and-exit)))
>
> The second-to-last line is my only change.
>
> Matt
>
>
>
>>
>> if you are able to reproduce or can see immediate errors in my ocnfig I'd
>> be grateful to hear about it.
>> Thanks!
>>
>> On Tue, Nov 1, 2016 at 2:13 PM, Matt Price <moptop99@gmail.com> wrote:
>>
>>> OK, I will try -- doesn't immediatley seem to work but I may have some
>>> crud kicking around my config that I need to get rid of.
>>>
>>> With both your orgmime and the standard library, htmlize-and-send works
>>> perfectly well when run from the headers. When run form the message body,
>>> sending fails with "Already sent by mail. Resend?" and drops me back into
>>> the buffer if I say "n". If I say "y", the send and save both fail. If I
>>> say "n", and go bak to the headers & execute C-c, sending now succeeds.
>>>
>>> No time to track down rihgt now but frustrating for sure!!
>>>
>>>
>>> On Tue, Nov 1, 2016 at 12:17 PM, John Kitchin <jkitchin@andrew.cmu.edu>
>>> wrote:
>>>
>>>> you could try my adapted version here:
>>>> https://github.com/jkitchin/scimax/blob/master/org-mime.el
>>>>
>>>> Matt Price writes:
>>>>
>>>> > On Mon, Oct 31, 2016 at 1:05 PM, John Kitchin <
>>>> jkitchin@andrew.cmu.edu>
>>>> > wrote:
>>>> >
>>>> >> I got that too for a while. Then it seemed to go away.
>>>> >
>>>> >
>>>> > If only I could copy-paste that part of your code ("seemed to go
>>>> away...")!
>>>> > Is pretty persistent for me.  Odldy, the first email I send in a new
>>>> emas
>>>> > seems to go out fine, and ot save fine in myu sent folder; after that
>>>> I get
>>>> > that error. Message sends if I hit C-c C-c again from the headers
>>>> section
>>>> > of the htmlized buffer. So, not a atastrophe, but not especially
>>>> > streamlined either.
>>>>
>>>>
>>>> --
>>>> Professor John Kitchin
>>>> Doherty Hall A207F
>>>> Department of Chemical Engineering
>>>> Carnegie Mellon University
>>>> Pittsburgh, PA 15213
>>>> 412-268-7803
>>>> @johnkitchin
>>>> http://kitchingroup.cheme.cmu.edu
>>>>
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 6342 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-11-18  5:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 23:19 replying to emai with org-mode syntax in mu4e Matt Price
2016-10-28 23:48 ` Thibault Marin
2016-10-29  1:17   ` Matt Price
2016-10-29  2:26     ` Thibault Marin
2016-10-29  1:54   ` Matt Price
2016-10-29 18:38     ` John Kitchin
     [not found]       ` <CAN_Dec_751WGJJGmV8WxFx7PWErPuoVBSWE2vOO4d2aFnBiS=g@mail.gmail.com>
     [not found]         ` <CAJ51ETphbVSdasHU7v+oTJUr80e_yOzqy50A9xOj1avGqv_LiA@mail.gmail.com>
     [not found]           ` <CAN_Dec8BsUK4e=fMrA+4UP5Z2ayHTXrR7tE93VXxbTGsErTTLQ@mail.gmail.com>
     [not found]             ` <CAJ51ETrKsH1icjaF2ahDnzv+_SdpApNvsJxY-LOnkQcSQE1t_A@mail.gmail.com>
     [not found]               ` <CAN_Dec_ndN-b6uj9h=EtJUQAVs7ZXYgny-MTXCXCJypEg2FDdQ@mail.gmail.com>
     [not found]                 ` <m2funbyy2q.fsf@andrew.cmu.edu>
     [not found]                   ` <CAN_Dec_zvD2X0J9DE7p5vBPDc9Pf=8bU5RimHy3qmTMc-9Gk6A@mail.gmail.com>
2016-11-17 18:10                     ` Matt Price
2016-11-18  1:42                       ` Matt Price
2016-11-18  5:12                         ` Matt Price

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).