简体   繁体   English

组织模式:使用-batch和-eval输出每周议程

[英]Org-mode: Output Weekly agenda using -batch and -eval

I am trying to display my org agenda on the background of my desktop even when Emacs is closed or minimized. 我正在尝试在关闭或最小化Emacs时在桌面背景上显示组织议程。 I have made some progress using this command: 使用此命令,我已经取得了一些进展:

emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' 2> /dev/null

It outputs: 它输出:

  Global list of TODO items of type: ALL
Available with `N r': (0)[ALL]
  remind:     TODO Garbage
  remind:     TODO Garbage and Recycling
  remind:     TODO Refill Prescription
  remind:     TODO Vitamins
  remind:     TODO Water Indoor Plants
  remind:     TODO Wake up!
  remind:     TODO Go to Sleep!

My .emacs contains the following relevant lines: 我的.emacs包含以下相关行:

;; org-agenda
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb) 

(setq org-agenda-files (list "~/Code/remind.org"
                             "~/Code/todo.org"
                         ))
;; show org-agenda each time Emacs is opened
(add-hook 'after-init-hook 'org-agenda-list)

My question is this. 我的问题是这个。 How do I customize this output to not display the following? 如何自定义此输出以不显示以下内容?

  Global list of TODO items of type: ALL
Available with `N r': (0)[ALL]

Use a different command key argument in the call to org-batch-agenda , eg: 在对org-batch-agenda的调用中使用其他命令键参数,例如:

(org-batch-agenda "a") (org-batch-agenda“ a”)

The doc string for org-batch-agenda says: org-batch-agenda的文档字符串说:

If CMD-KEY is a string of length 1, it is used as a key in 'org-agenda-custom-commands' and triggers this command. 如果CMD-KEY是长度为1的字符串,它将用作“ org-agenda-custom-commands”中的密钥并触发此命令。

If you don't like any of the existing ones, you can always define your own agenda custom command and attach a key to it; 如果您不喜欢任何现有命令,则可以随时定义自己的议程自定义命令并为其添加密钥; then you can call org-batch-agenda with that key. 那么您可以使用该键调用org-batch-agenda

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM