[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Sending TODO items automatically to a specified email addr
From: |
Bastien |
Subject: |
Re: [Orgmode] Sending TODO items automatically to a specified email address |
Date: |
Tue, 22 Feb 2011 16:30:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Marvin,
Marvin Doyley <address@hidden> 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