emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] create a "send plain text/pdf email with current header" functio


From: John Kitchin
Subject: Re: [O] create a "send plain text/pdf email with current header" function?
Date: Wed, 05 Aug 2015 14:38:48 -0400

* Automatic send email to myself

#+BEGIN_SRC emacs-lisp
(defun email-heading-to-me ()
  "Send the current org-mode heading as the body of an email, with headline as 
the subject."
  (interactive)
  (save-excursion
    (org-mark-subtree)
    (let ((content (buffer-substring (point) (mark)))
          (SUBJECT (nth 4 (org-heading-components))))

      (compose-mail "address@hidden" SUBJECT)
      (message-goto-body)
      (insert content)
      (message-send)
      (message-kill-buffer))))
#+END_SRC

#+RESULTS:
: email-heading-to-me


Xebar Saram writes:

> thx both John and Matt
>
> I went on and used johns function he recommended (since i needed a simple
> text only export) and it works flawlessly :)
>
> John: just a quick follow up though
>
> with that function you kindly shred "email-heading " it opens up a buffer
> and you insert the email address. is it possible to have a function that
> sends to a prefixed email address (ie myself :)). also can the function
> then just do it in the background without even opening the buffer? since i
> want to send it to a prefixed email i dont really need to see it and press
> C-c C-c.
>
> This isnt really important so if its complicated please feel free to ignore
> ;-)
>
> best
>
> Z
>
>
> On Sat, Aug 1, 2015 at 6:24 PM, John Kitchin <address@hidden> wrote:
>
>> You probably could use the function here
>> https://github.com/jkitchin/jmax/blob/master/email.el#L51 for the email
>> part after you find the heading you want to send. I think there is some
>> code there to send a pdf too.
>>
>>
>> On August 1, 2015, at 10:49 AM, Xebar Saram <address@hidden> wrote:
>>
>>
>> Hi all
>> i find that i keep copy pasting food recipes  (which i collect with org
>> obviously) to my email client and then sending it over to the phone to use
>> in the kitchen (which reminds Me really should get a emacs touch screen for
>> the kitchen..though my wife would get a stroke if she sees that
>> ;-))..anyway, anyone knows how one (with almost none to zero elisp skills)
>> create such a function?
>>
>> all i need is locate the recipe (header) and then send the header and sub
>> headers as text or pdf to my email
>>
>> best!
>>
>> Z
>>
>>

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]