Config: replace smart-mode-line by simple-modeline, optimize org-ql config, add basic guile support

This commit is contained in:
2026-04-15 03:11:12 +08:00
parent 1af78f99b7
commit a47205eef4
13 changed files with 163 additions and 80 deletions

View File

@@ -44,10 +44,8 @@
(format-time-string "%Y-%m-%d %a" time)))
org-journal-carryover-items "TODO=\"TODO\"|TODO=\"STARTED\"|TODO=\"WAITING\"|TODO=\"SOMEDAY\"")
(when *is-windows*
(setq org-journal-dir "h:/emacs/my-org-daily/"))
(when *is-mac*
(if *is-windows*
(setq org-journal-dir "h:/emacs/my-org-daily/")
(setq org-journal-dir "~/org/my-org-daily/"))
(add-hook 'org-journal-mode-hook 'font-lock-update)
@@ -111,7 +109,6 @@
(lambda ()
(global-cns-mode-enable-in-buffer)))
;; 一些随org-mode加载的基础配置
(add-hook 'org-mode-hook
(lambda ()
@@ -163,34 +160,53 @@
(setq org-agenda-files '("~/org/my-org-daily"
"~/org/my-org-note/")))
(when *is-linux*
(setq org-agenda-files '("~/org/my-org-daily/"
"~/org/my-org-note/")))
(setq org-agenda-span 'day)
(setq org-default-priority ?D)
(setq org-default-priority ?C)
(setq org-agenda-skip-function-global
'(org-agenda-skip-entry-if 'todo '("COMMENT")))
;; org-ql
(use-package org-ql)
(use-package org-ql
:config
(with-eval-after-load 'org-ql-view
(keymap-set org-ql-view-map (kbd "q") 'org-agenda-Quit))
(setq org-ql-views
'(("tags: emacs category:note"
:buffers-files org-agenda-files
:query (and (tags "emacs") (category "note"))
:sort date)
(setq org-ql-views
'(("tags: emacs category:note"
:buffers-files org-agenda-files
:query (and (tags "emacs") (category "note"))
:sort date)
("tags: org"
:buffers-files org-agenda-files
:query (tags "org"))
("tags: org"
:buffers-files org-agenda-files
:query (tags "org")
:super-groups ((:auto-property "CATEGORY")))
("all important todos"
:buffers-files org-agenda-files
:query (and (not (done)) (todo))
:super-groups
((:name "priority = A" :priority "A")
(:name "priority = B" :priority "B")
(:name "started" :todo "STARTED")
(:name "someday" :todo "SOMEDAY")))))
("group by time"
:buffers-files org-agenda-files
:query (and (ts :to "today") (tags "root"))
:sort date
:super-groups ((:auto-ts t)))
("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"))))))
;; org-super-agenda 配置
(use-package org-super-agenda
@@ -258,11 +274,13 @@
"~/org/my-org-note/"
(format-time-string "%Y%m%d")
my-org-capture-temp-title)))))
"#+title: %(symbol-value 'my-org-capture-temp-title)
"
#+title: %(symbol-value 'my-org-capture-temp-title)
#+date: %U
#+category: %^{Category|none|project|book|article|note|insight|fun}
#+category: %^{Category|none|project|book|article|note|wisdom|fun|data}
#+STARTUP: content
* %(symbol-value 'my-org-capture-temp-title) %^g
* %(symbol-value 'my-org-capture-temp-title) :root%^g
:PROPERTIES:
:END:
%U
@@ -276,6 +294,8 @@
"
:jump-to-captured t)))
(setq org-bookmark-names-plist nil)
(global-set-key (kbd "C-c o c") 'org-capture)
;; 批量调整表格