From: Patrick Drechsler <patrick@pdrechsler.de>
To: emacs-orgmode@gnu.org
Subject: Re: mail agenda similar to `diary-mail-entries'
Date: Sun, 10 Jun 2007 01:36:32 +0200 [thread overview]
Message-ID: <877iqc1z0f.fsf@pdrechsler.de> (raw)
In-Reply-To: 34aed42135ad4a217118ca0168898606@science.uva.nl
Carsten Dominik <dominik@science.uva.nl> writes:
> Untested:
>
> emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a")' \
> | mail user@address.com
>
>
> 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)
next prev parent reply other threads:[~2007-06-09 23:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 12:50 mail agenda similar to `diary-mail-entries' Patrick Drechsler
2007-05-15 18:47 ` Carsten Dominik
2007-06-09 23:36 ` Patrick Drechsler [this message]
2007-06-10 4:37 ` Carsten Dominik
2007-06-10 5:13 ` Eddward DeVilla
2007-06-11 11:10 ` Patrick Drechsler
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=877iqc1z0f.fsf@pdrechsler.de \
--to=patrick@pdrechsler.de \
--cc=emacs-orgmode@gnu.org \
/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).