简体   繁体   中英

Agenda view in Org mode

Created a .org file and added some items to it. Some items were scheduled, some with deadlines

But when I press Cc aa the scheduled items don't show up in the agenda view.

How can I make this work ?

M-x customize-variable RET org-agenda-files 

and adding the given file to org-agenda-files fixed it for me.

A quick way to add the current file temporarily to org-agenda-files is Cc [ (which is bound to org-agenda-file-to-front and as its name implies, adds the current file to the front of the list). You can get rid of it with Cc ] .

Adding a file to org-agenda-files permanently can only be done through customize or by setting the value in the initialization file.

Note also that although, in general, the value of org-agenda-files is a list of files, the list can include directories (in which case all files in the directory that match org-agenda-file-regexp will be considered agenda files) or it can be just a singe file name (a string), which is supposed to contain the list of agenda files, one file per line.

As always, it is useful to read the doc string of the variable: Ch v org-agenda-files RET .

I'd also suggest that as you get more directory files or add them into a specific directory, it will make more sense to add them all automatically in your ~/.emacs.d/init.el load file.

For example, and using the use-package style:

(use-package org
  :ensure org-plus-contrib
  :defer t
  :init
  (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))

  (setq org-agenda-files (list "~/Dropbox/org-mode"))
  (add-to-list 'org-agenda-files (expand-file-name "~/Dropbox/journal/"))
  etc etc... 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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