From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: sending emails from org Date: Tue, 08 Apr 2014 09:54:35 +0200 Message-ID: References: <87k3b1cj4y.fsf@talktalk.net> <87eh18c28e.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXQrk-0002nG-6X for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 03:54:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXQre-0001T8-Bt for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 03:54:44 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:51072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXQre-0001Sp-2x for emacs-orgmode@gnu.org; Tue, 08 Apr 2014 03:54:38 -0400 Received: by mail-wi0-f169.google.com with SMTP id hm4so7439887wib.0 for ; Tue, 08 Apr 2014 00:54:37 -0700 (PDT) In-Reply-To: <87eh18c28e.fsf@gmail.com> (Thorsten Jolitz's message of "Mon, 07 Apr 2014 22:29:37 +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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thorsten Jolitz writes: > 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.=20 > > 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.=20 > > Use M-# (outorg-copy-edits-and-exit) when you are done in the > \*outorg-edit-buffer\*.=20 > > 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) >=20=20 > Convert and copy to temporary Org buffer >=20=20 > With ARG, act conditional on the raw value of ARG: >=20=20 > | 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-- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > 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=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > ------------------------------------------------------------------ > C-u (4) edit-whole-buffer ---=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > C-1 1 edit-whole-buffer insert default export-template= =20=20=20 > C-2 2 edit-whole-buffer ask user for template-file=20=20= =20=20=20=20=20 > C-3 3 edit-whole-buffer insert and keep default template= =20 > C-4 4 edit-whole-buffer insert and keep template-file=20= =20=20=20 > > > ,---- > | (org-export-as 'ascii) > `---- This sounds very interesting and useful and I will definitely try it out because it sounds like adding many useful features I was missing in message-mode (I got so used to the org type editing...), But my reasoning to use org for composing some emails, is that I would like to have the emails in the project related org file. But it might be an option to use notmuch links as these are base on the message id and put these into the org files. Thanks a lot, Rainer > > > -- cheers, Thorsten > > > > Emacs 24.3.1 (Org mode 8.2.5h) =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTQ6s7AAoJENvXNx4PUvmCMsMH/0o45p9iayQIjPR0/BIPT8ai SFym6pNZ+gttUD87czJbnSH5XE7wVtHMGmp4JfUEyWbZTw54NA7IWj6Mv/TdxQN3 /Vc/zucgIRfyLFwopxX2zHgCAEc5hqB2k560wvZ13C/ZlGzhxovHazD+7c+SE5TE EWWF/NKIsE381zA+nK46d2S3cbGGxQveJzLpgPZQ5fcF2nuo2ypZz22GCUKnrvlf iVIsu9hA3TLyB9YbMzHrZxYHWkIwNT7NAOJP6D3zFeKx7Zcr2qohlP/iSWOXDFzm tBNv2tQ80pxZ0ShCN3Gl7jy0GprnqJBBhrJSTLqB6XzRRco5JY9+Gb1+D3y3zro= =S1XA -----END PGP SIGNATURE----- --=-=-=--