From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Doyley Subject: Re: Sending TODO items automatically to a specified email address Date: Tue, 22 Feb 2011 14:08:39 -0500 Message-ID: <5246364820990423512@unknownmsgid> References: <87d3mkkrx4.fsf@altern.org> Mime-Version: 1.0 (iPhone Mail 8C148a) Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=41718 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrxjA-0003zd-W8 for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 14:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Prxj9-00057N-SV for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 14:16:52 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:36176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Prxj9-00056r-NG for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 14:16:51 -0500 Received: by fxm5 with SMTP id 5so3091022fxm.0 for ; Tue, 22 Feb 2011 11:16:50 -0800 (PST) In-Reply-To: <87d3mkkrx4.fsf@altern.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: "emacs-orgmode@gnu.org" Thanks, Bastien By the way I use Mac mail, hopefully this shouldn't be a problem Cheers M Sent from my iPhone On Feb 22, 2011, at 10:30 AM, Bastien wrote: > Hi Marvin, > > Marvin Doyley writes: > >> Does anybody know how to send TODO as email attachment. What would be >> nice is if the TODO item is in the message and the text below it is >> an attachment. Basically, this is how I remind myself of things that >> I need to get done. > > The first step is to export selected entries to text files: > > #+begin_src emacs-lisp > (defun org-export-headings-to-ascii (&optional match scope) > "Export headings from the current buffer to ascii files." > (interactive) > (org-map-entries > (lambda () > (org-mark-subtree) > (let ((head (org-get-heading)) > (beg (point)) > (end (org-end-of-subtree))) > (org-export-region-as-ascii beg end t (get-buffer-create head)) > (with-current-buffer > (get-buffer-create head) > (write-file > (concat (replace-regexp-in-string " " "_" head) ".txt"))))) > ;; see org-map-entries docstring > match scope)) > #+end_src > > Then to attach the files, which depends on what MUA you use. > > HTH, > > -- > Bastien