[Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Oscar Carlsson
Rainer M Krug writes: > Hi > > From time to time, I would like to mail an .org buffer. At the moment, I > copy it into thunderbird and mail it - this is quite awkward. > > I assume, there must be a better way of doing this from within emacs?. > > I do not intend to switch to gnus or similar for r

[Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sébastien Vauban
Hi Eric, "Eric Schulte" wrote: > Please look at org-mime in the contrib directory. It is designed for > this exact need. Calling `org-mime-org-buffer-htmlize' from within an > Org-mode document will export the document to html, and then place the > html into a mail buffer with appropriate mime c

[Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sébastien Vauban
Eric, "Eric Schulte" wrote: > Sébastien Vauban writes: >> "Eric Schulte" wrote: >>> Please look at org-mime in the contrib directory. It is designed for >>> this exact need. Calling `org-mime-org-buffer-htmlize' from within an >>> Org-mode document will export the document to html, and then pla

[Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Matt Lundin
Rainer M Krug writes: > On 12/16/2010 09:25 AM, Jeff Horn wrote: >> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >> wrote: >>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>> C-c. > > Sound

[Orgmode] Re: Sending org buffer as mail?

2010-12-18 Thread Ethan Ligon
Eric Schulte gmail.com> writes: > > Jean-Marie Gaillourdet gaillourdet.net> writes: > > > Hi Eric, > > > > "Eric Schulte" gmail.com> writes: > > > >> Hi Matt, > >> > >> This looks great, how would you feel about trying to fold this into > >> org-mime, or would you mind if I did so. I've alrea

[Orgmode] Re: Sending org buffer as mail?

2010-12-20 Thread Sébastien Vauban
Hi Eric, "Eric Schulte" wrote: > I've added two hooks, `org-mime-send-subtree-hook' and > `org-mime-send-buffer-hook' which can be used to do this, for example > the following > > #+begin_src emacs-lisp > (add-hook 'org-mime-send-subtree-hook > (lambda () > (org-entry-p

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Jeff Horn
On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson wrote: > And then, I can send a org-file by attaching it to a mail in Emacs. Try > C-x m to start a new mail buffer, attach with C-c C-a and send with C-c > C-c. Does this attach the buffer or read it into the message? I thought the OP wanted to rea

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 09:25 AM, Jeff Horn wrote: > On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson > wrote: >> And then, I can send a org-file by attaching it to a mail in Emacs. Try >> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Oscar Carlsson
Jeff Horn writes: > On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson > wrote: >> And then, I can send a org-file by attaching it to a mail in Emacs. Try >> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >> C-c. > > Does this attach the buffer or read it into the message?

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Oscar Carlsson
Rainer M Krug writes: > On 12/16/2010 09:25 AM, Jeff Horn wrote: >> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >> wrote: >>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>> C-c. > > Sound

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 11:38 AM, Oscar Carlsson wrote: > Rainer M Krug writes: > >> On 12/16/2010 09:25 AM, Jeff Horn wrote: >>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >>> wrote: And then, I can send a org-file by attaching it to a mail in Emac

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 11:41 AM, Rainer M Krug wrote: > On 12/16/2010 11:38 AM, Oscar Carlsson wrote: >> Rainer M Krug writes: > >>> On 12/16/2010 09:25 AM, Jeff Horn wrote: On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson wrote: > And then, I c

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Eric Schulte
Please look at org-mime in the contrib directory. It is designed for this exact need. Calling `org-mime-org-buffer-htmlize' from within an Org-mode document will export the document to html, and then place the html into a mail buffer with appropriate mime configuration, ensuring things like linke

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 02:22 PM, Eric Schulte wrote: Hi Eric > Please look at org-mime in the contrib directory. It is designed for > this exact need. Calling `org-mime-org-buffer-htmlize' from within an > Org-mode document will export the document to html,

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Oscar Carlsson
Rainer M Krug writes: > On 12/16/2010 11:41 AM, Rainer M Krug wrote: >> On 12/16/2010 11:38 AM, Oscar Carlsson wrote: >>> Rainer M Krug writes: >> On 12/16/2010 09:25 AM, Jeff Horn wrote: > On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson > wrote: >> And then, I can send a org-

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Eric Schulte
Sébastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> Please look at org-mime in the contrib directory. It is designed for >> this exact need. Calling `org-mime-org-buffer-htmlize' from within an >> Org-mode document will export the document to html, and then place the >> html into a

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Eric Schulte
Hi, This is not implemented yet, but shouldn't be hard to implement starting with the current code base. I encourage anyone who is interested to take a look at org-mime and try their hand at improving it. I'm strapped for time at the moment and probably wont have time to take a look at it, but I

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Jeff Horn
On Thu, Dec 16, 2010 at 5:37 AM, Oscar Carlsson wrote: > Jeff Horn writes: > >> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >> wrote: >>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>> C-

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sebastian Rose
Rainer M Krug writes: > * Add message hook to include selected text as body > Thanks to Deniz Dogan > #+begin_src emacs-lisp > (add-hook 'message-mode-hook > (lambda () > (let (text) > (with-current-buffer (other-buffer) > (when (region

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sebastian Rose
Rainer M Krug writes: > OK - I asked on the emacs help list, and got a response. I added the > followig to my emacs.org: > > * Add message hook to include selected text as body > Thanks to Deniz Dogan > #+begin_src emacs-lisp > (add-hook 'message-mode-hook > (lambda () >

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Eric Schulte
Hi Matt, This looks great, how would you feel about trying to fold this into org-mime, or would you mind if I did so. I've already mimicked your function to set subjects of outgoing emails to match the title of the org-mode buffer. I think that generalizing the org-mime functions to operate over

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Eric Schulte
I'm attaching a new version of org-mime.el which incorporates Matt's function below. There are now two new functions, `org-mime-org-buffer' and `org-mime-org-subtree' each of which takes a format argument specifying the format of the final email, one of 'org, 'ascii, or 'html. So, for example the

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/17/2010 07:48 AM, Eric Schulte wrote: Hi eric > I'm attaching a new version of org-mime.el which incorporates Matt's > function below. There are now two new functions, `org-mime-org-buffer' > and `org-mime-org-subtree' each of which takes a for

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Eric Schulte
Rainer M Krug writes: > On 12/17/2010 07:48 AM, Eric Schulte wrote: > Hi eric > >> I'm attaching a new version of org-mime.el which incorporates Matt's >> function below. There are now two new functions, `org-mime-org-buffer' >> and `org-mime-org-subtree' each of which takes a format argument >>

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Matt Lundin
"Eric Schulte" writes: > This looks great, how would you feel about trying to fold this into > org-mime, or would you mind if I did so. I don't mind at all. Thanks for integrating it into org-mime.el! Now if only I could figure out how bbdb address completion works; then we could hook it into

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Jean-Marie Gaillourdet
Hi Eric, "Eric Schulte" writes: > Hi Matt, > > This looks great, how would you feel about trying to fold this into > org-mime, or would you mind if I did so. I've already mimicked your > function to set subjects of outgoing emails to match the title of the > org-mode buffer. I think that gener

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Eric Schulte
Jean-Marie Gaillourdet writes: > Hi Eric, > > "Eric Schulte" writes: > >> Hi Matt, >> >> This looks great, how would you feel about trying to fold this into >> org-mime, or would you mind if I did so. I've already mimicked your >> function to set subjects of outgoing emails to match the title o

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-17 Thread Eric Schulte
Thanks, I've just pushed up a new version of org-mime which makes use of this function. The two new externally visible functions are `org-mime-org-buffer-htmlize' (so named for backwards compatability) which will export the current buffer or region to an html/org multipart email. and `o

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-19 Thread Niels Giesen
"Eric Schulte" writes: > Thanks, I've just pushed up a new version of org-mime which makes use of > this function. [...] Hi Eric, I love the org-mime-subtree function! It makes writing good-looking mails very easy. Now for a proposal: For ascii export used for mail, it would be cool if SRC a

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-19 Thread Samuel Wales
Hi Niels, On 2010-12-19, Niels Giesen wrote: > ,[ emacs-lisp ] > | source here > ` This is much harder to extract. Even if most people are willing to use and know rectangle commands, newcomers don't. I once pointed this out on emacs-help, and one person responded by writing a command t

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-19 Thread Eric Schulte
Niels Giesen writes: > "Eric Schulte" writes: > >> Thanks, I've just pushed up a new version of org-mime which makes use of >> this function. > > [...] > > Hi Eric, > > I love the org-mime-subtree function! It makes writing good-looking > mails very easy. > > Now for a proposal: > > For ascii ex

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-19 Thread Eric Schulte
Ethan Ligon writes: > Eric Schulte gmail.com> writes: >> >> Jean-Marie Gaillourdet gaillourdet.net> writes: >> >> > Hi Eric, >> > >> > "Eric Schulte" gmail.com> writes: >> > >> >> Hi Matt, >> >> >> >> This looks great, how would you feel about trying to fold this into >> >> org-mime, or woul

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-21 Thread Niels Giesen
"Eric Schulte" writes: > Niels Giesen writes: > >> "Eric Schulte" writes: >> >>> Thanks, I've just pushed up a new version of org-mime which makes use of >>> this function. >> Hi Eric, thanks for implementing this. However, I see a problem in the solution for when html-ascii is specified as t

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-27 Thread Eric Schulte
Niels Giesen writes: > "Eric Schulte" writes: > >> Niels Giesen writes: >> >>> "Eric Schulte" writes: >>> Thanks, I've just pushed up a new version of org-mime which makes use of this function. >>> > > Hi Eric, thanks for implementing this. > > However, I see a problem in the solutio

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-27 Thread Samuel Wales
On 2010-12-21, Niels Giesen wrote: > On the subject of encouraging so-called code blocks brought to our > attention by Samuel, encouraging this was not my intention, I should > have thought better before posting and I will never in my life post such > immoral examples anymore. I got a good laugh

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-27 Thread Niels Giesen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sorry list for the last two mails (the ones with attachments), I messed things up there. Below the mail I sent to Eric, but forgot to copy carbonically to the list. "Eric Schulte" writes: > Niels Giesen writes: > >> "Eric Schulte" writes: >> >>> N

Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-27 Thread Eric Schulte
Niels Giesen writes: > > Thanks. I think I noticed a bug though, being that > `org-mime-pre-html-hook' is run for the ascii and org parts of > html-ascii and org. The code below should fix this: > Applied, Thanks -- Eric ___ Emacs-orgmode mailing list

[Niels Giesen] Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-27 Thread Niels Giesen
--- Begin Message --- "Eric Schulte" writes: > Niels Giesen writes: > >> "Eric Schulte" writes: >> >>> Niels Giesen writes: >>> "Eric Schulte" writes: > Thanks, I've just pushed up a new version of org-mime which makes use of > this function. >> >> Hi Eric, thanks for i