emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] modifying the format of planner-tasks-overview


From: Janne Hellsten
Subject: [emacs-wiki-discuss] modifying the format of planner-tasks-overview
Date: Fri, 5 Aug 2005 11:34:19 +0900

Hi all,

I used to use Emacs diary and have Emacs send me weekly task summaries
by e-mail using a cron script that calls `diary-mail-entries'.  I'd
like to achieve the same effect using Planner.  I'm pretty close to
completion, however I'd like to modify the formatting of
`planner-tasks-overview', as it doesn't look very nice in plain text.

The first thing I thought was to modify
`planner-tasks-overview-insert' in planner-tasks-overview.el so that
the default formatting could be overridden by calling some
customizable function.  Say, if
`planner-tasks-overview-insert-function' is defined, then call that
instead of doing the default formatting.

Do you think such a change would make sense?


Here's my setup for sending the tasks overview by e-mail:

-- clip: dot-planner.el --
(defvar janne/planner-mail-temp-buffer "*janne/planner tasks mail template*")

(defun janne/planner-tasks-email ()
  (interactive)
  ;; Go into tasks overview
  (planner-tasks-overview (planner-expand-name "+0") (planner-expand-name "+7"))
  (switch-to-buffer "*planner tasks overview*")
  (copy-to-buffer janne/planner-mail-temp-buffer 1 (point-max))
  ;; Format it as a mail:
  (switch-to-buffer janne/planner-mail-temp-buffer)
  (goto-char 1)
  (insert (format "From: %s\n" "address@hidden"))
  (insert "Subject: janne/planner: Tasks for the next 7 days\n")
  (insert (format "To: %s\n" "address@hidden"))
  (insert "--text follows this line--\n")
  (funcall send-mail-function)
-- clip --

-- clip: cron script --
#!/bin/sh
emacs --batch --eval "(progn (load-file \"~/.emacs\") (load-file
\"~/dot-planner.el\") (janne/planner-tasks-email))"
-- clip --

BR,
Janne




reply via email to

[Prev in Thread] Current Thread [Next in Thread]