[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Sending org buffer as mail?
From: |
Rainer M Krug |
Subject: |
Re: [Orgmode] Re: Sending org buffer as mail? |
Date: |
Thu, 16 Dec 2010 13:38:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14pre) Gecko/20101214 Lightning/1.0b2 Shredder/3.1.8pre |
-----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 <address@hidden> writes:
>
>>> On 12/16/2010 09:25 AM, Jeff Horn wrote:
>>>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson
>>>> <address@hidden> 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.
>>>
>>> Sounds very interesting - I'll try it out.
>>>
>>> C-x m looks great - I am sure I am going to use it a lot. And gmail is
>>> exactly what I want to use it for.
>>>
>>>>
>>>> Does this attach the buffer or read it into the message? I thought the
>>>> OP wanted to read-in a buffer.
>>>
>>> Yes - that was effectively what I am looking for: the possiblility to
>>> write my email in org mode and send the buffer content as the email text.
>>>
>>> Dream: Specify subject, to, cc, bcc (probably even attachments) as
>>> properties, press a key and the org file is send to the addresses.
>>>
>>> Rainer
>>>
>>>> There should be a built-in function for
>>>> that, but I've never used it.
>>>>
>
>> In my answer above, you'd have to include the file as an attachment, or
>> insert the text into the mail (either with M-x insert-file or
>> copy/paste), it would have been better if compose-mail would have
>> inserted any marked text or such, but I don't know how to code such
>> functionality :-(
>
> Thanks Oscar - I think I can live with it at the moment.
>
> But to insert the marked text in the email body sounds a lot like emacs...
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 ()
(let (text)
(with-current-buffer (other-buffer)
(when (region-active-p)
(setq text
(buffer-substring (region-beginning)
(region-end)))))
(when text
(end-of-buffer)
(insert text)))))
#+end_src
This is doing exactly as expected.
Cheers,
Rainer
>
> Cheers,
>
> Rainer
>
>
>> Oscar
>
>
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Tel: +33 - (0)9 53 10 27 44
Cell: +27 - (0)8 39 47 90 42
Fax (SA): +27 - (0)8 65 16 27 82
Fax (D) : +49 - (0)3 21 21 25 22 44
Fax (FR): +33 - (0)9 58 10 27 44
email: address@hidden
Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0KCFkACgkQoYgNqgF2egqX/ACdHmduO8M0C/QU6y9v9L/pTITj
BV4An1xAQJsRr+hd3Dx8UKWQ7d3+w7ps
=RDpz
-----END PGP SIGNATURE-----
- [Orgmode] Sending org buffer as mail?, Rainer M Krug, 2010/12/16
- [Orgmode] Re: Sending org buffer as mail?, Oscar Carlsson, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Jeff Horn, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Rainer M Krug, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Oscar Carlsson, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Rainer M Krug, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?,
Rainer M Krug <=
- Re: [Orgmode] Re: Sending org buffer as mail?, Oscar Carlsson, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Sebastian Rose, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Sebastian Rose, 2010/12/16
- [Orgmode] Re: Sending org buffer as mail?, Matt Lundin, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Eric Schulte, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?, Eric Schulte, 2010/12/17
- Re: [Orgmode] Re: Sending org buffer as mail?, Rainer M Krug, 2010/12/17
- Re: [Orgmode] Re: Sending org buffer as mail?, Eric Schulte, 2010/12/17
- Re: [Orgmode] Re: Sending org buffer as mail?, Matt Lundin, 2010/12/17
- Re: [Orgmode] Re: Sending org buffer as mail?, Eric Schulte, 2010/12/17