簡體   English   中英

Emacs org-agenda 導出議程 - 如何?

[英]Emacs org-agenda Export agenda -how to?

我是 Emacs 的新手,當然還有 lisp。 我知道我們可以使用Cx Cw保存議程(視圖?)。 很好,但是我們可以使用 (setq org-agenda-custom-commands) 來做到這一點嗎? 我想將每周議程保存到.txt文件(如agenda.txt )。

根據org-agenda-custom-commands的文檔(部分粘貼在這里):

Custom commands for the agenda. Each entry is a list like this:

(key desc type match settings files)

or

(key desc (cmd1 cmd2 ...) general-settings-for-whole-set files)

files     A list of files to write the produced agenda buffer to with
          the command org-store-agenda-views.
          If a file name ends in ".html", an HTML version of the buffer
          is written out.  If it ends in ".ps", a postscript version is
          produced.  Otherwise, only the plain text is written to the file.

您可以像這樣設置org-agenda-custom-commands

(setq org-agenda-custom-commands
      '(("n" "Agenda and all TODOs"
         ((agenda "")
          (alltodo ""))
         nil
         ("~/agenda.txt"))))

然后Mx org-agenda n Mx org-store-agenda-views將議程視圖保存到~/agenda.txt

或者你可以寫一個 function 來做到這一點。

(defun save-agenda-view (&optional arg)
  (interactive "P")
  (org-agenda arg "n")
  (org-store-agenda-views))

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM