diff --git a/custom.el b/custom.el index 881dc58..0f48c6a 100644 --- a/custom.el +++ b/custom.el @@ -9,7 +9,7 @@ exec-path-form-shell gcmh hungry-delete marginalia multiple-cursors orderless restart-emacs smart-mode-line solarized-theme vertico)) '(safe-local-variable-values - '((gptel-mode . t) + '((eval when (fboundp 'rainbow-mode) (rainbow-mode 1)) (gptel-mode . t) (eval progn (setq org-hugo-base-dir (if (eq system-type 'windows-nt) "h:/emacs/hugo/this-is-my-blog/" diff --git a/lisp/init-kbd-func.el b/lisp/init-kbd-func.el index 8a40f94..0a95b94 100644 --- a/lisp/init-kbd-func.el +++ b/lisp/init-kbd-func.el @@ -78,9 +78,10 @@ Disable jinx-mode if it's enable and global-jinx-mode is disable , otherwise tog (org-cycle)) (defun consult-org-ripgrep () - "Jump to org agenda files use consult-ripgrep." + "Search in org files use consult-ripgrep." (interactive) - (consult-ripgrep org-agenda-files)) + (consult-ripgrep (unless *is-windows* + '("~/org/my-org-note/" "~/org/hugo/this-is-my-blog/all-blog.org")))) (defun org-journal-open-current-journal-file-delete-other-window() "Call org-journal-open-current-journal-file and delete other window." diff --git a/lisp/init-kbd.el b/lisp/init-kbd.el index a60fa7d..44e472c 100644 --- a/lisp/init-kbd.el +++ b/lisp/init-kbd.el @@ -54,7 +54,8 @@ ;; o for org-mode (general-def :prefix "C-c o" - "s" 'consult-notes + "f" 'consult-notes + "s" 'consult-org-agenda "g" 'consult-org-ripgrep "C" 'calendar "c" 'org-capture diff --git a/lisp/init-org.el b/lisp/init-org.el index fd15b52..4b66123 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -181,11 +181,6 @@ :query (and (tags "emacs") (category "note")) :sort date) - ("tags: org" - :buffers-files org-agenda-files - :query (tags "org") - :super-groups ((:auto-property "CATEGORY"))) - ("group by time" :buffers-files org-agenda-files :query (and (ts :to "today") (tags "root")) @@ -195,16 +190,7 @@ ("group by category" :buffers-files org-agenda-files :query (tags "root") - :super-groups ((:auto-property "CATEGORY"))) - - ("all important todos" - :buffers-files org-agenda-files - :query (and (not (done)) (todo)) - :super-groups - ((:name "started" :todo "STARTED") - (:name "priority = A" :priority "A") - (:name "priority = B" :priority "B") - (:name "someday" :todo "SOMEDAY")))))) + :super-groups ((:auto-property "CATEGORY")))))) ;; org-super-agenda 配置 (use-package org-super-agenda @@ -242,7 +228,18 @@ ((org-ql-block-header "TODOs") (org-ql-sort '(start-time)) (org-super-agenda-groups - '((:auto-ts t))))))))) + '((:auto-ts t))))))) + + ("qa" "all TODO entries" + ((org-ql-block '(and (not (done)) (todo)) + ((org-ql-block-header "all TODOs") + (org-super-agenda-groups + '((:name "started" :todo "STARTED") + (:name "priority = A" :priority "A") + (:name "priority = B" :priority "B") + (:name "other priority" :priority< "B") + (:name "someday" :todo "SOMEDAY") + )))))))) (setq org-tag-alist '( ("scheme" . ?s) diff --git a/lisp/init-package.el b/lisp/init-package.el index 231d0ae..1d4dbe5 100644 --- a/lisp/init-package.el +++ b/lisp/init-package.el @@ -263,9 +263,7 @@ targets." (require 'init-jinx))) ;; flycheck -(use-package flycheck - :init - (add-hook 'after-init-hook #'global-flycheck-mode)) +(use-package flycheck) (use-package flycheck-guile :hook (scheme-mode . (lambda ()