emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff@gmail.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: emails written in Org Mode
Date: Thu, 10 Jul 2014 06:41:59 -0400	[thread overview]
Message-ID: <m2r41tpk1p.fsf@gmail.com> (raw)
In-Reply-To: <87pphd39e7.fsf@gmail.com>

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 <mankoff@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 <jkitchin@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	other threads:[~2014-07-10 10:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 18:28 emails written in Org Mode Ken Mankoff
2014-07-09  5:06 ` Joseph Vidal-Rosset
     [not found]   ` <CAAjq1me3p_QPNf_UyXsbO2A4B7t_vVAAi-nL-k5wNsq0AU2J7w@mail.gmail.com>
2014-07-11  6:48     ` Joseph Vidal-Rosset
2014-07-09  7:49 ` Thorsten Jolitz
2014-07-10 12:57   ` Alan Schmitt
2014-07-10 13:27     ` Thorsten Jolitz
2014-07-11  9:32       ` Alan Schmitt
2014-07-09 19:14 ` John Kitchin
2014-07-09 20:03   ` Nick Dokos
2014-07-09 20:14     ` Ken Mankoff
2014-07-10  8:28       ` Thorsten Jolitz
2014-07-10 10:41         ` Ken Mankoff [this message]
2014-07-10 11:29           ` Thorsten Jolitz
2014-07-09 22:33   ` Eric Abrahamsen
2014-07-10  0:33   ` Thorsten Jolitz
2014-07-10 21:15   ` Esben Stien
2014-07-14  1:05   ` Esben Stien
2014-07-14 13:34     ` Esben Stien
2014-07-14 22:49       ` John Kitchin
2014-07-15  0:41         ` Eric Abrahamsen
2014-07-15  0:57           ` Thorsten Jolitz
2014-07-15  1:52             ` Eric Abrahamsen
2014-07-15 14:11             ` Alan Schmitt
2014-07-15 14:16               ` Joseph Vidal-Rosset
2014-07-16  3:03                 ` Eric Abrahamsen
2014-07-16 17:02                   ` Joseph Vidal-Rosset
2014-07-16  3:08                 ` Eric Abrahamsen
2014-07-09 20:02 ` Noorul Islam K M
2014-07-10  0:44 ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r41tpk1p.fsf@gmail.com \
    --to=mankoff@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).