From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: emails written in Org Mode Date: Thu, 10 Jul 2014 02:33:03 +0200 Message-ID: <87r41uvz0l.fsf@gmail.com> References: <87r41uwdiy.fsf@andrew.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X52Ia-0005uw-W8 for emacs-orgmode@gnu.org; Wed, 09 Jul 2014 20:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X52IW-0003SM-1f for emacs-orgmode@gnu.org; Wed, 09 Jul 2014 20:33:20 -0400 Received: from plane.gmane.org ([80.91.229.3]:57179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X52IV-0003SI-R6 for emacs-orgmode@gnu.org; Wed, 09 Jul 2014 20:33:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X52IT-0002eb-Qx for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 02:33:13 +0200 Received: from g231224049.adsl.alicedsl.de ([92.231.224.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jul 2014 02:33:13 +0200 Received: from tjolitz by g231224049.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jul 2014 02:33:13 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Kitchin 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-# #, . | | (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 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