Make emacs automatically add files to the org agenda

This commit is contained in:
Nathan McCarty 2022-05-25 20:50:11 -04:00
parent de8b90bd13
commit c46949cfce
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
1 changed files with 22 additions and 0 deletions

View File

@ -202,6 +202,28 @@ Setup some basic cosmetic improvements
("^ *\\([+]\\) " ("^ *\\([+]\\) "
0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))) 0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "")))))
#+end_src #+end_src
Automatically add all files in the org dir to the agenda. This performs some filtering of the files returned from ~directory-files~ to exclude some things that would confuse org-agenda.
#+begin_src emacs-lisp
(after! org
(setq org-agenda-files
(seq-filter (lambda (item)
(and
;; Only accept things that are a directory, or an org file
(or (file-directory-p item)
(string-match-p ".*org$" item))
;; Exclude the syncthing folder
(not (string-match-p ".*stfolder$" item))
;; Exclude the elfeed data folder
(not (string-match-p (concat "^" (regexp-quote org-directory) "elfeed/.*") item))))
(directory-files-recursively org-directory directory-files-no-dot-files-regexp))))
#+end_src
Log state changes into a drawer
#+begin_src emacs-lisp
(after! org
(setq org-log-into-drawer t))
#+end_src
** org-roam ** org-roam
A second brain in emacs A second brain in emacs