emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: emails written in Org Mode
Date: Thu, 10 Jul 2014 02:33:03 +0200	[thread overview]
Message-ID: <87r41uvz0l.fsf@gmail.com> (raw)
In-Reply-To: 87r41uwdiy.fsf@andrew.cmu.edu

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?

Ok, message-mode is a text mode just like Org-mode and not a programming
mode, so it is not the perfect use-case for outshine/outorg, and it
would be possible to just change major-modes.

But why not resuse outorg for this if it already exists and works with
many other major-modes? The cost for typing M-# # is low (just as typing
C-c '), and it feels much smoother to switch to a temporary edit-buffer
than to change major-modes, and if only for the fact that you normally
don't have an Org-mode headline in a message-mode buffer, and Org
without a headline is like a cake without sugar, so you have to add one
manually to make things work and get the fontification.

Outorg does offer some export related conveniences too:

,----[ C-h f outorg-edit-as-org RET ]
| outorg-edit-as-org is an interactive Lisp function in `outorg.el'.
| 
| It is bound to M-# #, <menu-bar> <Outshine> <Edit As Org>.
| 
| (outorg-edit-as-org &optional ARG)
| 
| Convert and copy to temporary Org buffer
| 
| With ARG, act conditional on the raw value of ARG:
| 
| | prefix | raw | action 1          | action 2                       |
| |--------+-----+-------------------+--------------------------------|
| | C-u    | (4) | edit-whole-buffer | ---                            |
| | C-1    |   1 | edit-whole-buffer | insert default export-template |
| | C-2    |   2 | edit-whole-buffer | prompt user for template-file  |
| | C-3    |   3 | edit-whole-buffer | insert & keep default template |
| | C-4    |   4 | edit-whole-buffer | insert & keep template-file    |
| | C-5    |   5 | propagate changes | ---                            |
| 
| [back]
`----

i.e. you can temporarily (or persistently) add a default (or custom)
header to the message if you want to export it from Org-mode just by
giving a prefix arg. And, after inserting more headlines, you can decide
if you want to edit only the subtree at point (default) or the whole
buffer (with prefix arg).

> I played around with using a heading with properties to send an
> email. Basically the heading is the subject, you set some properties
> about TO, CC, etc... and the heading content is the body. You just put
> your cursor in the heading and run M-x email-heading. You can see the
> code here https://github.com/jkitchin/jmax/blob/master/email.el#L31
>
> and
>
> https://github.com/jkitchin/jmax/blob/master/email.el#L35
>
> It saves some details in properties, like when it was sent, etc... It is
> occasionally useful to me.

Using outshine/outorg with message-mode is just a nice side-effect,
their main purpose is of course bringing the look&feel of Org-mode to
programming modes. But they are easy to adapt to message-mode and very
smooth to use - so why not take advantage of this? 

> Ken Mankoff <mankoff@gmail.com> writes:
>
>> Hi Thorsten,  On a recent thread you wrote: 
>>
>>> ... *outorg-edit-buffer* (where I write my message-mode email in
>>> full
>>> org-mode).
>>
>> I already write emails in emacs. I'm interested in being able to compose
>> emails using Org Mode. I see you use gnus. I use mu4e[1]. I wonder if
>> your setup is gnus-specific or might work with other emacs mail
>> clients. Will you provide some information about this?
>>
>> Thanks,
>>
>>  -k.
>>
>> [1] http://www.djcbsoftware.nl/code/mu/mu4e.html
>>
>>

-- 
cheers,
Thorsten

  parent reply	other threads:[~2014-07-10  0:33 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
2014-07-10 11:29           ` Thorsten Jolitz
2014-07-09 22:33   ` Eric Abrahamsen
2014-07-10  0:33   ` Thorsten Jolitz [this message]
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=87r41uvz0l.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).