From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: sending emails from org Date: Mon, 07 Apr 2014 22:29:37 +0200 Message-ID: <87eh18c28e.fsf@gmail.com> References: <87k3b1cj4y.fsf@talktalk.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXG9i-0007F6-Gj for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 16:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXG9a-0006BN-D5 for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 16:28:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:60018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXG9a-0006B8-32 for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 16:28:26 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WXG9W-0000VU-CQ for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 22:28:22 +0200 Received: from g231104066.adsl.alicedsl.de ([92.231.104.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2014 22:28:22 +0200 Received: from tjolitz by g231104066.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2014 22:28:22 +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 Sharon Kimble writes: > Rainer M Krug writes: > >> Hi >> >> I have two questions concerning sending subtrees as emails. >> >> 1) Which properties are supported by org-mime - I could not find a list >> or an example of an email from org. >> >> 2) I am using gnus and have the following hooks to add automatic signing >> of emails: >> >> ,---- >> | #+begin_src emacs-lisp >> | (add-hook 'gnus-message-setup-hook 'mml-secure-message-sign-pgpmime) >> | (add-hook 'message-s'etup-hook 'mml-secure-message-sign-pgpmime) >> | #+end_src >> `---- >> >> These hooks are not called when composing emails in org. Is this on >> purpose, or to gnus specific? > > I've found that I have to have some commands both in '.emacs' and in > .gnus', > and I use the same code to sign my emails in gnus. I've never tried > writing an > email in org-mode, but if I was I'd tend to use a snippet from > YASnippet', or > write my own for it. I've always believed in writing emails in gnus, > and using > org-mode for TODOs, documents, etc. You probably could have the best of both worlds using outorg.el, which works out of the box with message-mode (although I never tried these signing functions). 1. get outshine.el and outorg.el (github or melpa) 2. before loading outline-mode: define outline-minor-mode prefix in .emacs: #+begin_src emacs-lisp ;; must be set before outline is loaded (defvar outline-minor-mode-prefix "\M-#") #+end_src or maybe "\C-c". 3. put this in your .emacs: #+begin_src emacs-lisp (require 'outshine) ; has soft dependency to 'outorg (add-hook 'outline-minor-mode-hook 'outshine-hook-function) (add-hook 'message-mode-hook 'outline-minor-mode) #+end_src 4. write your emails/posts in message-mode, and switch to full Org-mode with e.g. M-# M-# (M-x outorg-edit-as-org). When there are already Org-mode headlines in the message mode buffer, use C-u M-# M-# to edit the whole buffer in Org-mode, and M-# M-# to edit the subtree at point. Use M-# (outorg-copy-edits-and-exit) when you are done in the \*outorg-edit-buffer\*. There are several prefix args that allow you to (temporarilly or persistently) insert a template for export options: #+begin_quote outorg-edit-as-org is an interactive Lisp function in `outorg.el'. (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 | ask user for template-file | | C-3 | 3 | edit-whole-buffer | insert and keep default template | | C-4 | 4 | edit-whole-buffer | insert and keep template-file | #+end_quote As a little demonstration, I switch to outorg, and insert the following code-block. Doing C-c C-c in the block suffices to attach the ASCII version of the email. #+begin_src emacs-lisp :results value (org-export-as 'ascii) #+end_src #+results: ___________________ Thorsten Jolitz tjolitz@gmail.com ___________________ 1 --text follows this line-- ============================ Sharon Kimble writes: > Rainer M Krug writes: > Hi > > I have two >questions concerning sending subtrees as emails. > > 1) Which >properties are supported by org-mime - I could not find a list > or >an example of an email from org. > > 2) I am using gnus and have the >following hooks to add automatic signing > of emails: > > ,---- > | >#+begin_src emacs-lisp > | (add-hook 'gnus-message-setup-hook >'mml-secure-message-sign-pgpmime) > | (add-hook 'message-s'etup-hook >'mml-secure-message-sign-pgpmime) > | #+end_src > `---- > > These >hooks are not called when composing emails in org. Is this on > >purpose, or to gnus specific? I've found that I have to have some >commands both in '.emacs' and in .gnus', and I use the same code to >sign my emails in gnus. I've never tried writing an email in >org-mode, but if I was I'd tend to use a snippet from YASnippet', or >write my own for it. I've always believed in writing emails in gnus, >and using org-mode for TODOs, documents, etc. You probably could have the best of both worlds using outorg.el, which works out of the box with message-mode (although I never tried these signing functions). 1. get outshine.el and outorg.el (github or melpa) 2. before loading outline-mode: define outline-minor-mode prefix in .emacs: ,---- | ;; must be set before outline is loaded | (defvar outline-minor-mode-prefix "\M-#") `---- or maybe "\C-c". 1. put this in your .emacs: ,---- | (require 'outshine) ; has soft dependency to 'outorg | (add-hook 'outline-minor-mode-hook 'outshine-hook-function) | (add-hook 'message-mode-hook 'outline-minor-mode) `---- 1. write your emails/posts in message-mode, and switch to full Org-mode with e.g. M-# M-# (M-x outorg-edit-as-org). When there are already Org-mode headlines in the message mode buffer, use C-u M-# M-# to edit the whole buffer in Org-mode, and M-# M-# to edit the subtree at point. Use M-# (outorg-copy-edits-and-exit) when you are done in the \*outorg-edit-buffer\*. There are several prefix args that allow you to (temporarilly or persistently) insert a template for export options: outorg-edit-as-org is an interactive Lisp function in `outorg.el'. (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 ask user for template-file C-3 3 edit-whole-buffer insert and keep default template C-4 4 edit-whole-buffer insert and keep template-file ,---- | (org-export-as 'ascii) `---- -- cheers, Thorsten Emacs 24.3.1 (Org mode 8.2.5h) -- cheers, Thorsten