config: update org-mode, UI settings, and add EMMS media player
- Add EMMS music player configuration with mpv support - Refine org-mode with preload, new capture templates, and agenda setup - Update keybindings for windows, ibuffer, and org-store-link - Improve line number display settings
This commit is contained in:
@@ -3,21 +3,55 @@
|
||||
|
||||
(use-package org)
|
||||
|
||||
;; (if *is-windows*
|
||||
;; (progn (run-with-idle-timer
|
||||
;; 0.5 nil
|
||||
;; (lambda ()
|
||||
;; (with-temp-buffer
|
||||
;; (org-mode)
|
||||
;; (org-mode))
|
||||
;; (message "Org preloaded")))))
|
||||
;; 预加载,防止windows的org-mode加载卡顿
|
||||
(if *is-windows*
|
||||
(progn (run-with-idle-timer
|
||||
0.5 nil
|
||||
(lambda ()
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(org-mode))
|
||||
(message "Org preloaded")))))
|
||||
|
||||
;; 一些随org-mode加载的基础配置
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(require 'org-tempo)
|
||||
(org-indent-mode)
|
||||
(local-set-key (kbd "C-c i") 'consult-org-heading)))
|
||||
|
||||
;; 设置todo关键字
|
||||
(setq org-todo-keywords
|
||||
(quote ((sequence "TODO(t)" "STARTED(s)" "|" "DONE(d!/!)")
|
||||
(sequence "WAITING(w@/!)" "SOMEDAY(S)" "|" "CANCELLED(c@/!)" "MEETING(m)" "PHONE(p)"))))
|
||||
|
||||
;; 设置标题字体大小
|
||||
;; (dolist (face org-level-faces)
|
||||
;; (set-face-attribute face nil :height 1))
|
||||
|
||||
;; log默认放入drawer中
|
||||
(setq org-log-done t)
|
||||
(setq org-log-into-drawer t)
|
||||
|
||||
;; 将系统时间(星期)设为英文,防止中文乱码
|
||||
(setq system-time-locale "C")
|
||||
|
||||
;; capture模板
|
||||
(setq org-capture-templates
|
||||
'(("t" "Todo" entry (file+headline "d:/emacs/org/todos.org" "Workspace")
|
||||
"* TODO [#B] %?\n %i\n %U"
|
||||
:empty-lines 1)
|
||||
("j" "Journal" entry (file+datetree "d:/emacs/org/journal.org")
|
||||
"* %?\nEntered on %U\n %i\n")))
|
||||
|
||||
(global-set-key (kbd "C-c o c") 'org-capture)
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(("c" "important stuff"
|
||||
((tags-todo "+PRIORITY=\"A\"")))
|
||||
;; ...other commands here
|
||||
))
|
||||
|
||||
;; org-contrib 和 org-checklist
|
||||
(use-package org-contrib
|
||||
:straight (org-contrib :type git :host github :repo "emacsmirror/org-contrib"
|
||||
@@ -27,25 +61,11 @@
|
||||
(lambda ()
|
||||
(require 'org-checklist nil t)))
|
||||
|
||||
(setq org-log-done t)
|
||||
(setq org-log-into-drawer t)
|
||||
|
||||
;; agenda相关
|
||||
(global-set-key (kbd "C-c a") 'org-agenda)
|
||||
(setq org-agenda-files '("d:/emacs/org/learning-org-mode.org"))
|
||||
(setq org-agenda-files '("d:/emacs/org/learning-org-mode.org")) ; agenda文件,目录或单个文件
|
||||
(setq org-agenda-span 'day)
|
||||
|
||||
(setq org-capture-templates
|
||||
'(("t" "Todo" entry (file+headline "d:/emacs/org/learning-org-mode.org" "Workspace")
|
||||
"* TODO [#B] %?\n %i\n %U"
|
||||
:empty-lines 1)))
|
||||
|
||||
(global-set-key (kbd "C-c o c") 'org-capture)
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(("c" "important stuff"
|
||||
((tags-todo "+PRIORITY=\"A\"")))
|
||||
;; ...other commands here
|
||||
))
|
||||
|
||||
;; hugo
|
||||
(with-eval-after-load 'org-capture
|
||||
@@ -116,12 +136,9 @@ See `org-capture-templates' for more information."
|
||||
|
||||
(global-set-key (kbd "C-c o v") 'my-blog-preview)
|
||||
|
||||
;; org tempo
|
||||
;; (require 'org-tempo)
|
||||
|
||||
;; 批量调整表格
|
||||
(defun org-table-align-all ()
|
||||
"Ajust all org table in current buffer."
|
||||
"Ajust all table in current buffer."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
|
||||
Reference in New Issue
Block a user