From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: send org subtree as e-mail? Date: Tue, 03 Apr 2012 07:09:35 -0400 Message-ID: <87hax1rs0g.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF3Uu-0006lm-AD for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 09:10:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF3Ud-00023f-BZ for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 09:10:07 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:58151 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SF3Ud-0001xN-54 for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 09:09:51 -0400 In-Reply-To: (Peter Salazar's message of "Tue, 3 Apr 2012 03:46:03 -0400") 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: Peter Salazar Cc: org-mode Peter Salazar writes: > I frequently compose e-mails as subtrees of my org files. I'd like to be > able to e-mail the contents of these subtrees, maybe by first viewing the > subtree in an indirect buffer. > > My org files look like this: > > * e-mails > ** note to person about blah > To: person@blah.com > Subject: ADD people 7 times more likely to be creative > --text follows this line-- > > Dear Person, > > Blah blah blah. > > Best, > Peter > > I can open the subtree in an indirect buffer, but I can't e-mail the > contents as they appear because I get "Invalid header line." > > If I delete the org-header, I can successfully send the e-mail. But then I > need to undelete the header afterward. > > How can I send the contents of a subtree as an e-mail without first having > to delete the header? > > Thanks, > Peter Checkout the `org-mime-subtree' subtree command. It converts the current subtree to an email, pulling email headers from subtree properties, specifically MAIL_SUBJECT or subtree heading -> subject MAIL_TO -> TO MAIL_CC -> CC MAIL_BCC -> BCC MAIL_FMT -> determines the format of the email (e.g., org, ascii or html) so your example above would be ** note to person about blah :PROPERTIES: :MAIL_TO: person@blah.com :MAIL_SUBJECT: ADD people 7 times more likely to be creative :END: Dear Person, Blah blah blah. Best, Peter Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte/