[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: mail agenda similar to `diary-mail-entries'
From: |
Patrick Drechsler |
Subject: |
[Orgmode] Re: mail agenda similar to `diary-mail-entries' |
Date: |
Sun, 10 Jun 2007 01:36:32 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) |
Carsten Dominik <address@hidden> writes:
> Untested:
>
> emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a")' \
> | mail address@hidden
>
>
> With (setq org-agenda-include-diary t), the diary will
> be part of the mailing automatically.
I am very sorry for the late reply.
Thank you Carsten for your script!
The problem I am having with your approach is that `mail' requires a
full blown MTA. And since the diary script works fine with Emacs/Gnus
I was wondering if an approach along those lines might work, but to no
avail so far:
Here is the script I a trying to use:
--8<---------------cut here---------------start------------->8---
emacs \
--batch \
--load ~/.emacs.d/init.el \
--load ~/.emacs.d/.gnus \
--funcall org-mail
--8<---------------cut here---------------end--------------->8---
And I have tried this in my ~/.emacs (well, actually
~/.emacs.d/init.el, but that should not make a difference):
--8<---------------cut here---------------start------------->8---
;;; Test 1: this sends a message, but only replicates the header in the
;;; body. The actual body (the agenda) is not present.
;; (defun org-mail ()
;; "Send mail of agenda to myself."
;; (org-batch-agenda "a")
;; (compose-mail diary-mail-addr "agenda")
;; (insert (buffer-string))
;; (call-interactively (get mail-user-agent 'sendfunc)))
;;; Test 2
;;; ERROR:
;;; Buffer is read-only: #<buffer *Org Agenda*>
;; (defun org-mail ()
;; "Send mail of agenda to myself."
;; (compose-mail diary-mail-addr "agenda")
;; (insert (org-batch-agenda "a"))
;; (call-interactively (get mail-user-agent 'sendfunc)))
;;; Test 3:
;;; ERROR:
;;; Invalid header line (maybe a continuation line lacks initial whitespace)
;; (defun org-mail ()
;; "Send mail of agenda to myself."
;; (compose-mail diary-mail-addr "agenda")
;; (insert (org-agenda-list "a"))
;; (call-interactively (get mail-user-agent 'sendfunc)))
--8<---------------cut here---------------end--------------->8---
Maybe it is obvious to you or somebody else what I am doing wrong. I
have the impression that this might work somehow.
Thankful for any further input/ideas,
Patrick
--
OS's and GUI's come and go, only Emacs has lasting power.
(Per Abrahamsen)
- [Orgmode] Re: mail agenda similar to `diary-mail-entries',
Patrick Drechsler <=