mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Speed up my emacs start time :P
This commit is contained in:
parent
6557989bbb
commit
e76a49fd30
|
@ -777,6 +777,7 @@ same directory as the org-buffer and insert a link to this file."
|
||||||
(setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos")))
|
(setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos")))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Refreshing org roam agenda
|
||||||
(defun org-roam-refresh-agenda-list ()
|
(defun org-roam-refresh-agenda-list ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq prev-org-roam-db-choice org-roam-db-choice)
|
(setq prev-org-roam-db-choice org-roam-db-choice)
|
||||||
|
@ -788,8 +789,19 @@ same directory as the org-buffer and insert a link to this file."
|
||||||
(org-roam-switch-db prev-org-roam-db-choice 1)
|
(org-roam-switch-db prev-org-roam-db-choice 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Build agenda for first time during this session
|
;; Build agenda only when org agenda first opened for session
|
||||||
(org-roam-refresh-agenda-list)
|
(setq org-roam-agenda-initialized nil)
|
||||||
|
(defun org-roam-refresh-agenda-list-init ()
|
||||||
|
(if (not org-roam-agenda-initialized)
|
||||||
|
(funcall
|
||||||
|
(lambda ()
|
||||||
|
(org-roam-refresh-agenda-list)
|
||||||
|
(setq org-roam-agenda-initialized t)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(add-hook 'org-agenda-mode-hook 'org-roam-refresh-agenda-list-init)
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:prefix ("o a")
|
:prefix ("o a")
|
||||||
|
|
|
@ -910,6 +910,7 @@ exit
|
||||||
(setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos")))
|
(setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos")))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; Refreshing org roam agenda
|
||||||
(defun org-roam-refresh-agenda-list ()
|
(defun org-roam-refresh-agenda-list ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq prev-org-roam-db-choice org-roam-db-choice)
|
(setq prev-org-roam-db-choice org-roam-db-choice)
|
||||||
|
@ -921,8 +922,19 @@ exit
|
||||||
(org-roam-switch-db prev-org-roam-db-choice 1)
|
(org-roam-switch-db prev-org-roam-db-choice 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Build agenda for first time during this session
|
;; Build agenda only when org agenda first opened for session
|
||||||
(org-roam-refresh-agenda-list)
|
(setq org-roam-agenda-initialized nil)
|
||||||
|
(defun org-roam-refresh-agenda-list-init ()
|
||||||
|
(if (not org-roam-agenda-initialized)
|
||||||
|
(funcall
|
||||||
|
(lambda ()
|
||||||
|
(org-roam-refresh-agenda-list)
|
||||||
|
(setq org-roam-agenda-initialized t)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(add-hook 'org-agenda-mode-hook 'org-roam-refresh-agenda-list-init)
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:prefix ("o a")
|
:prefix ("o a")
|
||||||
|
|
Loading…
Reference in a new issue