emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] showing lists in agenda, and writing org-agenda to a file


From: Bastien
Subject: Re: [Orgmode] showing lists in agenda, and writing org-agenda to a file
Date: Mon, 07 Jan 2008 03:34:39 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Bastien <address@hidden> writes:

> ;; Use (org-write-agenda file)
> (defun org-agenda-to-file (key file &optional max-line-width)
>   "Write the `org-agenda' view associated with KEY to FILE.
> MAX-LINE-WIDTH optionally specifies the maximum line width for
> the text in the resulting file."
>   (interactive)
>   (save-window-excursion
>     (org-agenda nil key)
>     (switch-to-buffer "*Org Agenda*")
>     (org-write-agenda file)
>     (org-agenda-quit))
>   (if max-width (put-file-content-in-procustes-bed
>                file max-line-length)))

Sorry, typos, should read:

(defun org-agenda-to-file (key file &optional max-line-width)
  "Write the `org-agenda' view associated with KEY to FILE.
MAX-LINE-WIDTH optionally specifies the maximum line width for
the text in the resulting file."
  (interactive)
  (save-window-excursion
    (org-agenda nil key)
    (switch-to-buffer "*Org Agenda*")
    (org-write-agenda file)
    (org-agenda-quit))
  (if max-line-width (put-file-content-in-procustes-bed
                      file max-line-width)))

-- 
Bastien




reply via email to

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