emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastien.guerry@wikimedia.fr>
To: Marvin Doyley <marvinpas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Sending TODO items automatically to a specified email address
Date: Tue, 22 Feb 2011 16:30:31 +0100	[thread overview]
Message-ID: <87d3mkkrx4.fsf@altern.org> (raw)
In-Reply-To: <AANLkTim=DP99-UyV73z9oSBXb4aOc=p9zbmfQr8-vEDt@mail.gmail.com> (Marvin Doyley's message of "Sat, 19 Feb 2011 15:36:18 -0500")

Hi Marvin,

Marvin Doyley <marvinpas@gmail.com> 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

  parent reply	other threads:[~2011-02-22 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-19 20:36 Sending TODO items automatically to a specified email address Marvin Doyley
2011-02-19 20:48 ` Matthew Sauer
2011-02-19 22:24   ` Marvin Doyley
2011-02-22 15:30 ` Bastien [this message]
2011-02-22 19:08   ` Marvin Doyley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3mkkrx4.fsf@altern.org \
    --to=bastien.guerry@wikimedia.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=marvinpas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).