From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: create a "send plain text/pdf email with current header" function? Date: Wed, 05 Aug 2015 14:38:48 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN3aY-00080L-CS for emacs-orgmode@gnu.org; Wed, 05 Aug 2015 14:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZN3aV-0003f8-51 for emacs-orgmode@gnu.org; Wed, 05 Aug 2015 14:38:54 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:35275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN3aV-0003f4-1D for emacs-orgmode@gnu.org; Wed, 05 Aug 2015 14:38:51 -0400 Received: by qgj62 with SMTP id 62so11336366qgj.2 for ; Wed, 05 Aug 2015 11:38:50 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xebar Saram Cc: "emacs-orgmode@gnu org" * 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 "your@email.here" 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 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 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