[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Sending org buffer as mail?
From: |
Oscar Carlsson |
Subject: |
Re: [Orgmode] Re: Sending org buffer as mail? |
Date: |
Thu, 16 Dec 2010 14:49:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Rainer M Krug <address@hidden> 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 <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.
Oh, I think that can be very handy in the long run. Thanks for sharing
the snippet!
Oscar
- [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, 2010/12/16
- Re: [Orgmode] Re: Sending org buffer as mail?,
Oscar Carlsson <=
- 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
- Re: [Orgmode] Re: Sending org buffer as mail?, Niels Giesen, 2010/12/19