Hi Thorsten and others,

Thanks to your help I have it set up well. Here is my setup, based on
the idea from John Kitchin to just switch major modes:

1. I've set mu4e so that the reply line starts with "*" (an Org
   section) like this:

   #+BEGIN_SRC emacs-lisp
   (setq message-citation-line-format "* On %Y-%m-%d at %R, %f wrote:")
   #+END_SRC

   Now, the quoted part of the email is its own section.

2. I've added a function to switch between org-mode and
   mu4e-compose-mode, and bound it to C-@, so I can easily swap modes:

   #+BEGIN_SRC emacs-lisp
   (defun kdm-mu4e-org-compose ()
   "Switch to/from mu4e-compose-mode and org-mode"
   (interactive)
   (if (eq 'mu4e-compose-mode (buffer-local-value 'major-mode (current-buffer)))
       (org-mode)
     (mu4e-compose-mode)))
   (global-set-key "\M-@" 'kdm-mu4e-org-compose)
   #+END_SRC

With this, I read emails in mu4e. When I hit reply, I reply
normally. If I want to drop into Org mode for the reply, I do so with
M-@, use Org, and then M-@ back to mu4e before sending.

I've just set this up. We'll see how well it works. mu4e used to
support Org and I'm sure it will in the future, and then things might
be better integrated, but I think this will work for now.

  -k.

* On 2014-07-10 at 04:28, Thorsten Jolitz wrote:
> Ken Mankoff <mank...@gmail.com> writes:
>
> Hi Ken,
>
>> orgstruct++-mode and orgtbl-mode help a lot. It would be nice to be able
>> to execute code too. 
>
> they are both nice but not the "real thing"
>
>> I have an email in to the mu4e group about just switching to org-mode
>> and then back to message-mode. Since mu4e isn't gnus, and doesn't use
>> plain message-mode as the major mode, I need to switch back to the mu4e
>> compose mode, but it lists as "m4e:compose" in the modeline, and that
>> isn't a major mode I can figure out how to switch to.
>
> When you start writing an email in mu4e, could you just:
>
>  1. do
>
>  ,----
>  | M-: major-mode
>  `----
>  
>  2. do M-x mark-whole-buffer & M-x kill-ring-save, i.e.
>  
>  ,----
>  | C-x h
>  | M-w
>  `----
>
> and post the results?
>
> And maybe figure out if in the mu4e world there exists a customizable
> variable like:
>
> ,----[ C-h v mail-header-separator RET ]
> | mail-header-separator is a variable defined in `sendmail.el'.
> | Its value is "--text follows this line--"
> | 
> | Documentation:
> | Line used to separate headers from text in messages being composed.
> | You can customize this variable.
> `----
>
> This would probably give me all the info I need to adapt outorg.
>
>> On 2014-07-09 at 16:03, Nick Dokos wrote:
>
>>> John Kitchin <jkitc...@andrew.cmu.edu> writes:
>>>
>>>> Can't you just change your buffer mode to org-mode, compose, change back
>>>> to message-mode and send? Did you want to do more than that?
>>>>
>>>
>>> ... or, depending on what one wants to do, adding one of the minor modes
>>> (orgstruct-mode, orgstruct++-mode, orgtbl-mode) to message-mode buffers
>>> may be enough.


Reply via email to