[O] Integration of notmuch email references in notes in org-mode
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi - From time to time, I have to include email references in notes in org. There is obviously org-notmuch.el, but I am not to happy with it as, when exporting the notes, the link is shown but neither clickable nor the resulting email is shown in the exported document (both understandable). I could also include a bash source block: #+header: :results output org #+begin_src sh notmuch show thread: #+end_src the result ooks ugly formated - if I use raw, I can not fold the result, due to strange characters at the beginning of the header lines. I think that source block approaȟ could work very nbicely, if one could somehow format the result as an email - but I have no idea how. I actually would prefer the source block approach, as the email would be physically in the org document and foldable. Any suggestions how I could achieve this? Thanks, Rainer - -- 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: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRIjFsAAoJENvXNx4PUvmCB0kH+QFL4jRInkoOdwVbOiiD5DcO pNLeMND0t1N5zBxORwDdFfdjLvN4nJ7r3i0Bh6qldtAbOc/7hKQx1E1wVxQoSJp+ XyB+H7vycb29l4cSGgXjqRbkgnwLy8NyYZlHza3dej3Nv1ZLdu5trdg/QCwxtivP kmJPDhiZepAFmjPcU+hYicOf0iT+B1NpfPa3ZumaJEld1yFgHw2ELGJbReKwlsbJ yDbUq6kTK4HfHRpcNmqvavEWPCSQunAUGNJUV0aXPya9Fh4k2+1UXSDPX+oZch9Z nq9lOLoHyR8U3qvTicojmfJgyZ9LzpDqdlKgMW+FGLJsNLVqZ24EpBaSQ2iHgzc= =DwaG -END PGP SIGNATURE-
Re: [O] Integration of notmuch email references in notes in org-mode
Hi Rainer On Mon, Feb 18, 2013 at 02:49:32PM +0100, Rainer M Krug wrote: - From time to time, I have to include email references in notes in org. There is obviously org-notmuch.el, but I am not to happy with it as, when exporting the notes, the link is shown but neither clickable nor the resulting email is shown in the exported document (both understandable). This has also been an irritation of mine. I think I will take your second idea (include the email on export) and see if I can come-up with a patch for org-notmuch. Since I'm still a newbie elisp programmer, this might take a while. :-p I could also include a bash source block: #+header: :results output org #+begin_src sh notmuch show thread: #+end_src the result ooks ugly formated - if I use raw, I can not fold the result, due to strange characters at the beginning of the header lines. Actually what you see is supposed to be easily parsed. From the notmuch-show man page: --format=(text|json|sexp|mbox|raw) text (default for messages) The default plain-text format has all text-content MIME parts decoded. Various components in the output, (message, header, body, attachment, and MIME part), will be delimited by easily-parsed markers. Each marker consists of a Control-L character (ASCII decimal 12), the name of the marker, and then either an opening or closing brace, ('{' or '}'), to either open or close the component. For a multipart MIME message, these parts will be nested. I'm assuming what you presently see is in text format (default). Since you are not happy with this, I would suggest you try the mbox format. [...] mbox All matching messages are output in the traditional, Unix mbox format with each message being prefixed by a line beginning with From and a blank line separating each message. Lines in the message content beginning with From (preceded by zero or more '' characters) have an additional '' character added. This reversible escaping is termed mboxrd format and described in detail here: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html A quick question though, how do you plan on handling attachments, I presume you want to strip them? In that case you will have to parse the output anyway. Hope this helps, -- Suvayu Open source is the future. It sets us free.
Re: [O] Integration of notmuch email references in notes in org-mode
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/02/13 16:12, Suvayu Ali wrote: Hi Rainer On Mon, Feb 18, 2013 at 02:49:32PM +0100, Rainer M Krug wrote: - From time to time, I have to include email references in notes in org. There is obviously org-notmuch.el, but I am not to happy with it as, when exporting the notes, the link is shown but neither clickable nor the resulting email is shown in the exported document (both understandable). This has also been an irritation of mine. I think I will take your second idea (include the email on export) and see if I can come-up with a patch for org-notmuch. Since I'm still a newbie elisp programmer, this might take a while. :-p If there is a solution in sight, I am happy to wait a bit - email in export, possibly in a block so that it is set apart from the rest of the document, would be brilliant. Possibly having an option which can be set to have links exported as links or expanded on export, would be really nice. I could also include a bash source block: #+header: :results output org #+begin_src sh notmuch show thread: #+end_src the result ooks ugly formated - if I use raw, I can not fold the result, due to strange characters at the beginning of the header lines. Actually what you see is supposed to be easily parsed. From the notmuch-show man page: --format=(text|json|sexp|mbox|raw) text (default for messages) The default plain-text format has all text-content MIME parts decoded. Various components in the output, (message, header, body, attachment, and MIME part), will be delimited by easily-parsed markers. Each marker consists of a Control-L character (ASCII decimal 12), the name of the marker, and then either an opening or closing brace, ('{' or '}'), to either open or close the component. For a multipart MIME message, these parts will be nested. I'm assuming what you presently see is in text format (default). Since you are not happy with this, I would suggest you try the mbox format. [...] mbox All matching messages are output in the traditional, Unix mbox format with each message being prefixed by a line beginning with From and a blank line separating each message. Lines in the message content beginning with From (preceded by zero or more '' characters) have an additional '' character added. This reversible escaping is termed mboxrd format and described in detail here: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html Haven't thought about that - should be straight forward to find a suitable format. A quick question though, how do you plan on handling attachments, I presume you want to strip them? Yes - attachments should be included simply as a line Attachment: NameOfAttachment - that would be fine. Thanks, and I am looking forward to the new additions to org-notmuch, Rainer In that case you will have to parse the output anyway. Hope this helps, -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRIknZAAoJENvXNx4PUvmCo1AIAI+xSqnxwHLCitiFmPO/wDXV ygMahUG58s1sy9qDlaKMUmO5GQoHXO9HBFlNyHYt++iBqbUU02LDeCIHbFOv2CT6 Fnzk6SH/eq2sZMIctHju3ybLYYKqV/jJJQwTHEBNjPyywC6IE3cpx0Xftv/xKERw hKiUttnyucZm3JVoZGLA5kAssq6SAUXFONxaRDekDl4Bch6HNfjoNTSpl4kw0FQz Jqym+8I8zRMSbrXGyo87KcIM6h3sKTZaeSmAzeuVD3I2E3ovWC2ufbAewLhgpM8P K8NuR5tURz4DLaoE0Qy9jy0PTZsvzNBt11dB4v9KQHHjIzacGYdiKuWHElLxoc4= =CMyd -END PGP SIGNATURE-