Config: update path, add org capture tamplate.
This commit is contained in:
@@ -107,6 +107,8 @@
|
|||||||
:config
|
:config
|
||||||
(add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode)))
|
(add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode)))
|
||||||
|
|
||||||
|
(use-package ahk-mode)
|
||||||
|
|
||||||
;; tree-sitter
|
;; tree-sitter
|
||||||
(use-package treesit-auto
|
(use-package treesit-auto
|
||||||
:demand t
|
:demand t
|
||||||
|
|||||||
@@ -42,14 +42,14 @@
|
|||||||
("e" "~/.emacs.d/")
|
("e" "~/.emacs.d/")
|
||||||
("p" "c:/Users/gaozh/Pictures/Screenshots/" "Pictures")
|
("p" "c:/Users/gaozh/Pictures/Screenshots/" "Pictures")
|
||||||
("d" "f:/下载25-2-10/" "Download")
|
("d" "f:/下载25-2-10/" "Download")
|
||||||
("v" "f:/luping26-1-11/" "Videos"))))
|
("v" "f:/luping26-1-11/" "Videos")
|
||||||
(dirvish-quick-access-entries
|
("n" "h:/emacs/my-org-note/" "Notes")))
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
'(("h" "~/" "Home")
|
'(("h" "~/" "Home")
|
||||||
("e" "~/.emacs.d/")
|
("e" "~/.emacs.d/")
|
||||||
("p" "~/Pictures/" "Pictures")
|
("p" "~/Pictures/" "Pictures")
|
||||||
("d" "~/Downloads/" "Download")
|
("d" "~/Downloads/" "Download")
|
||||||
("v" "~/Movies/" "Videos")))))
|
("v" "~/Movies/" "Videos")))))
|
||||||
|
|
||||||
(use-package trashed
|
(use-package trashed
|
||||||
:commands (trashed)
|
:commands (trashed)
|
||||||
|
|||||||
@@ -35,17 +35,17 @@
|
|||||||
(setq org-journal-file-format "%Y-%m-%d.org"
|
(setq org-journal-file-format "%Y-%m-%d.org"
|
||||||
org-journal-file-header "#+category: journal\n#+STARTUP: content\n\n"
|
org-journal-file-header "#+category: journal\n#+STARTUP: content\n\n"
|
||||||
org-journal-time-prefix "\n*** TODO "
|
org-journal-time-prefix "\n*** TODO "
|
||||||
org-journal-time-format "%m-%d \n:PROPERTIES:\n:Created: <%Y-%m-%d %a %H:%M:%S>\n:END:\n"
|
org-journal-time-format "%m-%d \n<%Y-%m-%d %a %H:%M:%S>\n"
|
||||||
org-journal-hide-entries-p t
|
org-journal-hide-entries-p t
|
||||||
org-journal-date-format (lambda (time)
|
org-journal-date-format (lambda (time)
|
||||||
(format "* %s %s\n:PROPERTIES:\n:Created: [%s]\n:END:"
|
(format "* %s %s\n[%s]\n"
|
||||||
(format-time-string "%Y-%m-%d" time)
|
(format-time-string "%Y-%m-%d" time)
|
||||||
(format-time-string "%a" time)
|
(format-time-string "%a" time)
|
||||||
(format-time-string "%Y-%m-%d %a" time)))
|
(format-time-string "%Y-%m-%d %a" time)))
|
||||||
org-journal-carryover-items "TODO=\"TODO\"|TODO=\"STARTED\"|TODO=\"WAITING\"|TODO=\"SOMEDAY\"")
|
org-journal-carryover-items "TODO=\"TODO\"|TODO=\"STARTED\"|TODO=\"WAITING\"|TODO=\"SOMEDAY\"")
|
||||||
|
|
||||||
(when *is-windows*
|
(when *is-windows*
|
||||||
(setq org-journal-dir "D:/emacs/my-org-daily/"))
|
(setq org-journal-dir "h:/emacs/my-org-daily/"))
|
||||||
|
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
(setq org-journal-dir "~/org/my-org-daily/"))
|
(setq org-journal-dir "~/org/my-org-daily/"))
|
||||||
@@ -110,6 +110,7 @@
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(global-cns-mode-enable-in-buffer)))
|
(global-cns-mode-enable-in-buffer)))
|
||||||
|
|
||||||
|
|
||||||
;; 一些随org-mode加载的基础配置
|
;; 一些随org-mode加载的基础配置
|
||||||
(add-hook 'org-mode-hook
|
(add-hook 'org-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
@@ -155,8 +156,9 @@
|
|||||||
|
|
||||||
(when *is-windows*
|
(when *is-windows*
|
||||||
(with-eval-after-load 'org
|
(with-eval-after-load 'org
|
||||||
(setq org-agenda-files '("d:/emacs/hugo/this-is-my-blog/all-blog.org"
|
(setq org-agenda-files '("h:/emacs/hugo/this-is-my-blog/all-blog.org"
|
||||||
"d:/emacs/my-org-daily/"))))
|
"h:/emacs/my-org-daily/"
|
||||||
|
"h:/emacs/my-org-note/"))))
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
(with-eval-after-load 'org
|
(with-eval-after-load 'org
|
||||||
(setq org-agenda-files '("~/org/my-org-daily"))))
|
(setq org-agenda-files '("~/org/my-org-daily"))))
|
||||||
@@ -168,14 +170,14 @@
|
|||||||
(setq org-agenda-skip-function-global
|
(setq org-agenda-skip-function-global
|
||||||
'(org-agenda-skip-entry-if 'todo '("COMMENT")))
|
'(org-agenda-skip-entry-if 'todo '("COMMENT")))
|
||||||
|
|
||||||
|
;; org-ql
|
||||||
|
(use-package org-ql)
|
||||||
|
|
||||||
;; org-super-agenda 配置
|
;; org-super-agenda 配置
|
||||||
(use-package org-super-agenda
|
(use-package org-super-agenda
|
||||||
:config
|
:config
|
||||||
(org-super-agenda-mode))
|
(org-super-agenda-mode))
|
||||||
|
|
||||||
;; org-ql
|
|
||||||
(use-package org-ql)
|
|
||||||
|
|
||||||
;; 自定义已完成任务视图
|
;; 自定义已完成任务视图
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
'(("pa" "Priority >= A"
|
'(("pa" "Priority >= A"
|
||||||
@@ -209,12 +211,39 @@
|
|||||||
(org-super-agenda-groups
|
(org-super-agenda-groups
|
||||||
'((:auto-ts t)))))))))
|
'((:auto-ts t)))))))))
|
||||||
|
|
||||||
|
(setq org-tag-alist '(
|
||||||
|
("scheme" . ?s)
|
||||||
|
("emacs" . ?e)
|
||||||
|
("linux" . ?l)
|
||||||
|
("computer-stuff" . ?c)
|
||||||
|
("philosophy" . ?p)
|
||||||
|
("game" . ?g)
|
||||||
|
("gamestudies" . ?G)
|
||||||
|
))
|
||||||
|
|
||||||
;; capture模板
|
;; capture模板
|
||||||
(when *is-windows*
|
(when *is-windows*
|
||||||
|
(defvar my-org-capture-temp-title "" "Temporarily store the org-capture filename.")
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(("t" "Todo" entry (file+headline "d:/emacs/org/todos.org" "Workspace")
|
'(("n" "New Note" plain
|
||||||
"* TODO [#B] %?\n %i\n %U"
|
(file (lambda ()
|
||||||
:empty-lines 1))))
|
(setq my-org-capture-temp-title (read-string "Filename (without .org): "))
|
||||||
|
(expand-file-name (format "%s/%s-%s.org"
|
||||||
|
"h:/emacs/my-org-note"
|
||||||
|
(format-time-string "%Y%m%d")
|
||||||
|
my-org-capture-temp-title))))
|
||||||
|
"#+title: %(symbol-value 'my-org-capture-temp-title)
|
||||||
|
#+created: %U
|
||||||
|
#+category: %^{Category|none|plan|book|article|note|insight}
|
||||||
|
#+filetags: %^g
|
||||||
|
|
||||||
|
* %(symbol-value 'my-org-capture-temp-title)
|
||||||
|
:PROPERTIES:
|
||||||
|
:END:
|
||||||
|
|
||||||
|
%?
|
||||||
|
"
|
||||||
|
:jump-to-captured t))))
|
||||||
|
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
@@ -260,14 +289,14 @@ See `org-capture-templates' for more information."
|
|||||||
;; It is assumed that below file is present in `org-directory'
|
;; It is assumed that below file is present in `org-directory'
|
||||||
;; and that it has a "Blog Ideas" heading. It can even be a
|
;; and that it has a "Blog Ideas" heading. It can even be a
|
||||||
;; symlink pointing to the actual location of all-posts.org!
|
;; symlink pointing to the actual location of all-posts.org!
|
||||||
(file+headline "d:/emacs/hugo/this-is-my-blog/all-blog.org" "Blog Ideas")
|
(file+headline "h:/emacs/hugo/this-is-my-blog/all-blog.org" "Blog Ideas")
|
||||||
(function org-hugo-new-subtree-post-capture-template))))
|
(function org-hugo-new-subtree-post-capture-template))))
|
||||||
|
|
||||||
;; 快速部署
|
;; 快速部署
|
||||||
(defun my-blog-publish ()
|
(defun my-blog-publish ()
|
||||||
"Publish blog , git add/commit/push , generate commit message."
|
"Publish blog , git add/commit/push , generate commit message."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((blog-dir "d:/emacs/hugo/this-is-my-blog/")
|
(let* ((blog-dir "h:/emacs/hugo/this-is-my-blog/")
|
||||||
(timestamp (format-time-string "%Y-%m-%d %H:%M:%S"))
|
(timestamp (format-time-string "%Y-%m-%d %H:%M:%S"))
|
||||||
(default-directory blog-dir))
|
(default-directory blog-dir))
|
||||||
|
|
||||||
@@ -296,7 +325,7 @@ See `org-capture-templates' for more information."
|
|||||||
"Save and preview blog."
|
"Save and preview blog."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(let ((default-directory "d:/emacs/hugo/this-is-my-blog/"))
|
(let ((default-directory "h:/emacs/hugo/this-is-my-blog/"))
|
||||||
;; 启动 Hugo server
|
;; 启动 Hugo server
|
||||||
(start-process "hugo-server" "*hugo-server*"
|
(start-process "hugo-server" "*hugo-server*"
|
||||||
"hugo" "server" "-D" "--bind" "0.0.0.0" "--port" "1313")
|
"hugo" "server" "-D" "--bind" "0.0.0.0" "--port" "1313")
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
;; emacs-chinese-word-segmentation 配置
|
;; emacs-chinese-word-segmentation 配置
|
||||||
(when *is-windows*
|
(when *is-windows*
|
||||||
(add-to-list 'load-path "D:/emacs/emacs-chinese-word-segmentation")
|
(add-to-list 'load-path "h:/emacs/emacs-chinese-word-segmentation/")
|
||||||
;; 设置为进程调用方式
|
;; 设置为进程调用方式
|
||||||
(setq cns-process-type 'shell)
|
(setq cns-process-type 'shell)
|
||||||
;; 设置可执行文件路径
|
;; 设置可执行文件路径
|
||||||
(setq cns-prog "D:/emacs/emacs-chinese-word-segmentation/cnws.exe")
|
(setq cns-prog "h:/emacs/emacs-chinese-word-segmentation/cnws.exe")
|
||||||
;; 设置字典目录
|
;; 设置字典目录
|
||||||
(setq cns-dict-directory "D:/emacs/emacs-chinese-word-segmentation/cppjieba/dict")
|
(setq cns-dict-directory "h:/emacs/emacs-chinese-word-segmentation/cppjieba/dict")
|
||||||
;; 直接设置进程命令,绕过 Windows shell 检测
|
;; 直接设置进程命令,绕过 Windows shell 检测
|
||||||
(setq cns-process-shell-command
|
(setq cns-process-shell-command
|
||||||
(format "%s %s %s %s %s %s"
|
(format "%s %s %s %s %s %s"
|
||||||
|
|||||||
Reference in New Issue
Block a user