Compare commits
10 Commits
0739da85cc
...
58e01139b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58e01139b5 | ||
|
|
ddd2ba4905 | ||
|
|
abe00aa936 | ||
|
|
3aa98696cf | ||
|
|
74691ac72b | ||
|
|
ffa5717770 | ||
|
|
a1a1797035 | ||
|
|
97d0a4a3e4 | ||
|
|
8328d2a8ff | ||
| 959db450d7 |
@@ -68,7 +68,6 @@
|
|||||||
search-ring
|
search-ring
|
||||||
regexp-search-ring
|
regexp-search-ring
|
||||||
extended-command-history)
|
extended-command-history)
|
||||||
savehist-ignored-variables '(consult-notes-history)
|
|
||||||
savehist-autosave-interval 300))
|
savehist-autosave-interval 300))
|
||||||
|
|
||||||
;; saveplace,保存光标位置
|
;; saveplace,保存光标位置
|
||||||
@@ -80,7 +79,7 @@
|
|||||||
(use-package restart-emacs)
|
(use-package restart-emacs)
|
||||||
|
|
||||||
;; async
|
;; async
|
||||||
(if *is-android*
|
(unless *is-android*
|
||||||
(use-package async
|
(use-package async
|
||||||
:hook
|
:hook
|
||||||
(after-init . dired-async-mode)
|
(after-init . dired-async-mode)
|
||||||
@@ -238,11 +237,6 @@
|
|||||||
:config
|
:config
|
||||||
(setq eww-auto-rename-buffer t))
|
(setq eww-auto-rename-buffer t))
|
||||||
|
|
||||||
;; shr
|
|
||||||
(use-package shr
|
|
||||||
:config
|
|
||||||
(setq shr-inhibit-images nil))
|
|
||||||
|
|
||||||
(provide 'init-base)
|
(provide 'init-base)
|
||||||
|
|
||||||
;;; init-base.el ends here
|
;;; init-base.el ends here
|
||||||
|
|||||||
@@ -35,6 +35,14 @@
|
|||||||
(*is-linux*
|
(*is-linux*
|
||||||
(setq consult-locate-args "plocate --basename --ignore-case")))
|
(setq consult-locate-args "plocate --basename --ignore-case")))
|
||||||
|
|
||||||
|
;; help
|
||||||
|
(define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help)
|
||||||
|
(setq consult-narrow-key "<")
|
||||||
|
|
||||||
|
;; xref
|
||||||
|
(setq xref-show-definitions-function #'consult-xref)
|
||||||
|
(setq xref-show-xrefs-function #'consult-xref)
|
||||||
|
|
||||||
;; set some buffer filter
|
;; set some buffer filter
|
||||||
(setq consult-buffer-filter
|
(setq consult-buffer-filter
|
||||||
(cl-union consult-buffer-filter
|
(cl-union consult-buffer-filter
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
:stream t
|
:stream t
|
||||||
:models '(kimi-for-coding)
|
:models '(kimi-for-coding)
|
||||||
:header (lambda (_)
|
:header (lambda (_)
|
||||||
(when-let ((key (gptel--get-api-key)))
|
(when-let* ((key (gptel--get-api-key)))
|
||||||
`(("User-Agent" . "RooCode/3.30.3")
|
`(("User-Agent" . "RooCode/3.30.3")
|
||||||
("HTTP-Referer" . "https://github.com/RooVetGit/Roo-Cline")
|
("HTTP-Referer" . "https://github.com/RooVetGit/Roo-Cline")
|
||||||
("X-Title" . "Roo Code")
|
("X-Title" . "Roo Code")
|
||||||
@@ -53,7 +53,8 @@
|
|||||||
(string-trim clean)))
|
(string-trim clean)))
|
||||||
|
|
||||||
(defun my-gptel-save-session ()
|
(defun my-gptel-save-session ()
|
||||||
"Save current gptel session to ~/gptel/sessions/ with AI-generated filename.
|
"Save current gptel session to ~/gptel/sessions/ with AI-generated
|
||||||
|
filename.
|
||||||
The filename is prefixed with a YYYYMMDD-HHmmss timestamp and generated
|
The filename is prefixed with a YYYYMMDD-HHmmss timestamp and generated
|
||||||
from the last 1500 characters of the buffer."
|
from the last 1500 characters of the buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -63,11 +64,15 @@ from the last 1500 characters of the buffer."
|
|||||||
(content (with-current-buffer buf
|
(content (with-current-buffer buf
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
(tail (substring content (max 0 (- (length content) 1500))))
|
(tail (substring content (max 0 (- (length content) 1500))))
|
||||||
(prompt-text (format "Based on the following conversation, generate a short kebab-case filename (3 to 5 lowercase English words, hyphen-separated, no file extension). Output ONLY the filename, nothing else.\n\n%s"
|
(prompt-text (format "Based on the following conversation, generate a short kebab-case
|
||||||
|
filename (3 to 5 lowercase English words, hyphen-separated, no file
|
||||||
|
extension). Output ONLY the filename, nothing else.\n\n%s"
|
||||||
tail)))
|
tail)))
|
||||||
(message "Generating filename with AI...")
|
(message "Generating filename with AI...")
|
||||||
(let ((fsm (gptel-request prompt-text
|
(let ((fsm (gptel-request prompt-text
|
||||||
:system "You are a filename generator. Output ONLY a short kebab-case filename (3-5 lowercase English words separated by hyphens). No explanations, no quotes, no punctuation, no file extension."
|
:system "You are a filename generator. Output ONLY a short kebab-case
|
||||||
|
filename (3-5 lowercase English words separated by hyphens). No
|
||||||
|
explanations, no quotes, no punctuation, no file extension."
|
||||||
:stream nil
|
:stream nil
|
||||||
:callback
|
:callback
|
||||||
(lambda (response info)
|
(lambda (response info)
|
||||||
@@ -132,7 +137,7 @@ from the last 1500 characters of the buffer."
|
|||||||
:models '((kimi-for-coding))
|
:models '((kimi-for-coding))
|
||||||
:request-params '(:temperature 0.6 :thinking (:type "disabled"))
|
:request-params '(:temperature 0.6 :thinking (:type "disabled"))
|
||||||
:header (lambda (_)
|
:header (lambda (_)
|
||||||
(when-let ((key (gptel--get-api-key)))
|
(when-let* ((key (gptel--get-api-key)))
|
||||||
`(("User-Agent" . "RooCode/3.30.3")
|
`(("User-Agent" . "RooCode/3.30.3")
|
||||||
("HTTP-Referer" . "https://github.com/RooVetGit/Roo-Cline")
|
("HTTP-Referer" . "https://github.com/RooVetGit/Roo-Cline")
|
||||||
("X-Title" . "Roo Code")
|
("X-Title" . "Roo Code")
|
||||||
|
|||||||
@@ -110,9 +110,36 @@ otherwise toggle global-jinx-mode."
|
|||||||
`~/org/my-org-note/20260508T220745==metanote--all-my-metanotes__org.org'"
|
`~/org/my-org-note/20260508T220745==metanote--all-my-metanotes__org.org'"
|
||||||
(interactive)
|
(interactive)
|
||||||
(find-file
|
(find-file
|
||||||
"~/org/my-org-note/20260508T220745==metanote--all-my-metanotes__org.org"))
|
(concat org-directory "/20260508T220745==metanote--all-my-metanotes__org.org")))
|
||||||
|
|
||||||
(defun org-table-align-all ()
|
(defun my-denote-find-file ()
|
||||||
|
"Find file use denote-file-prompt."
|
||||||
|
(interactive)
|
||||||
|
(let ((denote-excluded-files-regexp "=journal"))
|
||||||
|
(find-file (denote-file-prompt))))
|
||||||
|
|
||||||
|
(defun my-denote-find-backlink-with-location ()
|
||||||
|
"Like `denote-find-backlink-with-location' but with consult preview."
|
||||||
|
(interactive)
|
||||||
|
(when-let* ((current-file buffer-file-name)
|
||||||
|
(id (or (denote-retrieve-filename-identifier current-file)
|
||||||
|
(user-error "The current file does not have a Denote identifier")))
|
||||||
|
(files (denote-directory-files nil :omit-current :text-only))
|
||||||
|
(fetcher (lambda () (xref-matches-in-files id files))))
|
||||||
|
(consult-xref fetcher nil)))
|
||||||
|
|
||||||
|
(defun my-denote-org-find-backlink-for-heading-with-location ()
|
||||||
|
"Like `denote-org-backlinks-for-heading' but with consult preview."
|
||||||
|
(interactive)
|
||||||
|
(unless (featurep 'denote-org)
|
||||||
|
(require 'denote-org))
|
||||||
|
(when-let* ((heading-id (or (denote-org--get-file-id-and-heading-id-or-context)
|
||||||
|
(user-error "The current file does not have a denote identifier")))
|
||||||
|
(files (denote-directory-files nil :omit-current :text-only))
|
||||||
|
(fetcher (lambda () (xref-matches-in-files heading-id files))))
|
||||||
|
(consult-xref fetcher nil)))
|
||||||
|
|
||||||
|
(defun my-org-table-align-all ()
|
||||||
"Ajust all table in current buffer."
|
"Ajust all table in current buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
@@ -251,18 +278,18 @@ argument)."
|
|||||||
(when-let* ((proj (project-current t)))
|
(when-let* ((proj (project-current t)))
|
||||||
(consult-ripgrep (project-root proj))))
|
(consult-ripgrep (project-root proj))))
|
||||||
|
|
||||||
(defun my-color-picker ()
|
(defun consult-colors-emacs (color)
|
||||||
"Pick a color with preview."
|
"Show a list of all supported colors for a particular frame.
|
||||||
(interactive)
|
|
||||||
(let* ((colors (defined-colors))
|
You can insert the name (default), or insert or kill the hexadecimal or RGB
|
||||||
(choice (completing-read
|
value of the selected COLOR."
|
||||||
"Color: "
|
(interactive
|
||||||
(mapcar (lambda (c)
|
(list (consult--read (list-colors-duplicates (defined-colors))
|
||||||
(propertize
|
:prompt "Emacs color: "
|
||||||
(format "%-20s %s" c "████")
|
:require-match t
|
||||||
'face `(:foreground ,c)))
|
:category 'color
|
||||||
colors))))
|
:history '(:input consult-colors-history))))
|
||||||
(string-trim (car (split-string choice)))))
|
(insert color))
|
||||||
|
|
||||||
(defun fix-theme-colors ()
|
(defun fix-theme-colors ()
|
||||||
"Fix invalid color name in theme files."
|
"Fix invalid color name in theme files."
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
"R" 'rainbow-mode
|
"R" 'rainbow-mode
|
||||||
"b" 'indent-bars-mode
|
"b" 'indent-bars-mode
|
||||||
"t" 'consult-theme
|
"t" 'consult-theme
|
||||||
"c" 'my-color-picker
|
"c" 'consult-colors-emacs
|
||||||
"f" 'describe-face
|
"f" 'describe-face
|
||||||
"r" 'rainbow-delimiters-mode
|
"r" 'rainbow-delimiters-mode
|
||||||
"k" 'keycast-header-line-mode
|
"k" 'keycast-header-line-mode
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"v" 'magit-project-status
|
"v" 'magit-project-status
|
||||||
"V" 'project-vc-dir
|
"V" 'project-vc-dir
|
||||||
"a" 'my-gptel-agent-project
|
"a" 'my-gptel-agent-project
|
||||||
"i" 'projectile-ibuffer)
|
"i" 'project-ibuffer)
|
||||||
|
|
||||||
;; v for version control
|
;; v for version control
|
||||||
(general-def
|
(general-def
|
||||||
@@ -91,9 +91,9 @@
|
|||||||
;; o for org-mode
|
;; o for org-mode
|
||||||
(general-def
|
(general-def
|
||||||
:prefix "C-c o"
|
:prefix "C-c o"
|
||||||
"f" 'consult-notes
|
"f" 'my-denote-find-file
|
||||||
|
"g" 'consult-denote-grep
|
||||||
"s" 'consult-org-agenda
|
"s" 'consult-org-agenda
|
||||||
"g" 'consult-notes-search-in-all-notes
|
|
||||||
"C" 'calendar
|
"C" 'calendar
|
||||||
"c" 'org-capture
|
"c" 'org-capture
|
||||||
"d" 'denote
|
"d" 'denote
|
||||||
@@ -232,8 +232,8 @@
|
|||||||
"C-," 'crux-duplicate-current-line-or-region
|
"C-," 'crux-duplicate-current-line-or-region
|
||||||
"C-c o l" 'denote-link
|
"C-c o l" 'denote-link
|
||||||
"C-c o L" 'denote-org-link-to-heading
|
"C-c o L" 'denote-org-link-to-heading
|
||||||
"C-c o b" 'denote-backlinks
|
"C-c o b" 'my-denote-find-backlink-with-location
|
||||||
"C-c o B" 'denote-org-backlinks-for-heading
|
"C-c o B" 'my-denote-org-find-backlink-for-heading-with-location
|
||||||
"C-c o t" 'my-org-tree-slide-start)
|
"C-c o t" 'my-org-tree-slide-start)
|
||||||
|
|
||||||
;; org-tree-slide-mode
|
;; org-tree-slide-mode
|
||||||
|
|||||||
155
lisp/init-org.el
155
lisp/init-org.el
@@ -11,7 +11,22 @@
|
|||||||
(org-mode . my-org-electric-pair-fix)
|
(org-mode . my-org-electric-pair-fix)
|
||||||
(org-mode . electric-pair-local-mode)
|
(org-mode . electric-pair-local-mode)
|
||||||
|
|
||||||
|
:init
|
||||||
|
(setq org-directory
|
||||||
|
(cond
|
||||||
|
(*is-windows* "h:/emacs/my-org-note")
|
||||||
|
(*is-mac* "~/org/my-org-note")
|
||||||
|
(*is-linux* "~/org/my-org-note")
|
||||||
|
(*is-android* "~/storage/shared/my-org-note")))
|
||||||
|
|
||||||
:config
|
:config
|
||||||
|
(defvar org-hide-space-keywords
|
||||||
|
'(("\\cc\\( \\)[*/_=~+]\\cc.*?[*/_=~+]"
|
||||||
|
(0 (prog1 () (add-text-properties (match-beginning 1) (match-end 1) '(invisible t)))))
|
||||||
|
("[*/_=~+].*?\\cc[*/_=~+]\\( \\)\\cc"
|
||||||
|
(0 (prog1 () (add-text-properties (match-beginning 1) (match-end 1) '(invisible t)))))))
|
||||||
|
(font-lock-add-keywords 'org-mode org-hide-space-keywords 'append)
|
||||||
|
|
||||||
(if *is-windows*
|
(if *is-windows*
|
||||||
(add-hook 'org-mode-hook 'font-lock-update))
|
(add-hook 'org-mode-hook 'font-lock-update))
|
||||||
|
|
||||||
@@ -33,20 +48,11 @@
|
|||||||
|
|
||||||
;; 设置todo关键字
|
;; 设置todo关键字
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
(quote ((sequence "TODO(t)" "STARTED(S)" "|" "DONE(d!/!)")
|
(quote ((sequence "TODO(t)" "SOMEDAY(S)" "STARTED(s)" "WAITING(w)" "|" "DONE(d!/!)" "CANCELLED(c@/!)")
|
||||||
(sequence "IDKY(i)" "SOMEDAY(s)" "|" "CANCELLED(c@/!)"))))
|
(sequence "IDKY(i)" "|" "KNOWN(k)" "CANCELLED(c@/!)"))))
|
||||||
|
|
||||||
;; agenda相关
|
;; agenda相关
|
||||||
(cond
|
(setq org-agenda-files `(,(concat org-directory "/20260509T232442==agenda--all-my-todos__org.org")))
|
||||||
(*is-windows*
|
|
||||||
(setq org-agenda-files '("h:/emacs/hugo/this-is-my-blog/all-blog.org"
|
|
||||||
"h:/emacs/my-org-note/20260509T232442==agenda--all-my-todos__org.org")))
|
|
||||||
(*is-mac*
|
|
||||||
(setq org-agenda-files '("~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org")))
|
|
||||||
(*is-linux*
|
|
||||||
(setq org-agenda-files '("~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org")))
|
|
||||||
(*is-android*
|
|
||||||
(setq org-agenda-files '("~/storage/shared/my-org-note/20260509T232442==agenda--all-my-todos__org.org"))))
|
|
||||||
|
|
||||||
(setq org-agenda-span 'day)
|
(setq org-agenda-span 'day)
|
||||||
(setq org-agenda-skip-function-global
|
(setq org-agenda-skip-function-global
|
||||||
@@ -75,26 +81,28 @@
|
|||||||
:hook
|
:hook
|
||||||
(after-init . denote-rename-buffer-mode)
|
(after-init . denote-rename-buffer-mode)
|
||||||
(dired-mode . denote-dired-mode)
|
(dired-mode . denote-dired-mode)
|
||||||
:config
|
|
||||||
(cond
|
|
||||||
(*is-android*
|
|
||||||
(setq denote-directory "~/storage/shared/my-org-note/"))
|
|
||||||
(*is-windows*
|
|
||||||
(setq denote-directory "H:/emacs/my-org-note/"))
|
|
||||||
(t
|
|
||||||
(setq denote-directory "~/org/my-org-note/")))
|
|
||||||
:init
|
:init
|
||||||
(setq denote-prompts '(title signature keywords))
|
(setq denote-directory org-directory)
|
||||||
(setq denote-title-history nil)
|
(setq denote-org-store-link-to-heading 'context
|
||||||
(setq denote-signature-history
|
denote-prompts '(title signature keywords))
|
||||||
'("note" "project" "fun" "wisdom" "article" "data" "metanote" "agenda" "journal" "archive"))
|
(setq denote-title-history nil
|
||||||
(setq denote-known-keywords
|
denote-signature-history
|
||||||
'("emacs"))
|
'("note" "project" "fun" "wisdom" "article" "data" "metanote" "agenda" "journal" "archive")
|
||||||
(setq denote-title-history nil))
|
denote-known-keywords
|
||||||
|
'("emacs")
|
||||||
|
denote-title-history nil))
|
||||||
|
|
||||||
;; denote-org
|
;; denote-org
|
||||||
(use-package denote-org)
|
(use-package denote-org)
|
||||||
|
|
||||||
|
;; denote-lint
|
||||||
|
(use-package denote-lint
|
||||||
|
:straight '(denote-lint :type git
|
||||||
|
:host github
|
||||||
|
:repo "Andsy10/denote-lint")
|
||||||
|
:config
|
||||||
|
(setq org-link-elisp-confirm-function nil))
|
||||||
|
|
||||||
;; denote-journal
|
;; denote-journal
|
||||||
(use-package denote-journal
|
(use-package denote-journal
|
||||||
:hook
|
:hook
|
||||||
@@ -108,16 +116,12 @@
|
|||||||
;; denote-explore
|
;; denote-explore
|
||||||
(use-package denote-explore)
|
(use-package denote-explore)
|
||||||
|
|
||||||
;; consult-notes
|
;; consult-denote
|
||||||
(use-package consult-notes
|
(use-package consult-denote
|
||||||
:straight
|
|
||||||
'(consult-notes :fork (:host github :repo "Andsy10/consult-notes"))
|
|
||||||
:hook
|
:hook
|
||||||
(after-init . consult-notes-denote-mode)
|
(after-init . consult-denote-mode)
|
||||||
:config
|
:init
|
||||||
(setq consult-notes-denote-display-keywords-indicator "_")
|
(setq consult-denote-grep-command 'consult-ripgrep))
|
||||||
(setq consult-notes-denote-display-id-format 'date)
|
|
||||||
(setq consult-notes-denote-display-signature t))
|
|
||||||
|
|
||||||
;; org-download
|
;; org-download
|
||||||
(use-package org-download
|
(use-package org-download
|
||||||
@@ -149,23 +153,7 @@
|
|||||||
(org-agenda-finalize . disable-truncate-lines)
|
(org-agenda-finalize . disable-truncate-lines)
|
||||||
:config
|
:config
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
'(("pa" "priority >= A"
|
'(("qd" "TODO entries sort by closed time"
|
||||||
((org-ql-block '(and (priority "A") (todo))
|
|
||||||
((org-ql-block-header "priority = A")))))
|
|
||||||
("pb" "priority >= B"
|
|
||||||
((org-ql-block '(and (priority >= "B") (todo))
|
|
||||||
((org-ql-block-header "priority >= B")
|
|
||||||
(org-super-agenda-groups
|
|
||||||
'((:name "priority = A" :priority "A")
|
|
||||||
(:name "priority = B" :priority "B")))))))
|
|
||||||
("pc" "priority >= C"
|
|
||||||
((org-ql-block '(and (priority >= "C") (todo))
|
|
||||||
((org-ql-block-header "priority >= C")
|
|
||||||
(org-super-agenda-groups
|
|
||||||
'((:name "priority = A" :priority "A")
|
|
||||||
(:name "priority = B" :priority "B")
|
|
||||||
(:name "priority = C" :priority "C")))))))
|
|
||||||
("qd" "TODO entries sort by closed time"
|
|
||||||
((org-ql-block '(closed)
|
((org-ql-block '(closed)
|
||||||
((org-ql-block-header "Closed TODOs")
|
((org-ql-block-header "Closed TODOs")
|
||||||
(org-super-agenda-groups
|
(org-super-agenda-groups
|
||||||
@@ -190,6 +178,7 @@
|
|||||||
((org-ql-block-header "all TODOs")
|
((org-ql-block-header "all TODOs")
|
||||||
(org-super-agenda-groups
|
(org-super-agenda-groups
|
||||||
'((:name "started" :todo "STARTED")
|
'((:name "started" :todo "STARTED")
|
||||||
|
(:name "waiting" :todo "WAITING")
|
||||||
(:name "priority = A" :priority "A")
|
(:name "priority = A" :priority "A")
|
||||||
(:name "priority = B" :priority "B")
|
(:name "priority = B" :priority "B")
|
||||||
(:name "priority = C" :priority "C")
|
(:name "priority = C" :priority "C")
|
||||||
@@ -201,39 +190,24 @@
|
|||||||
(use-package org-capture
|
(use-package org-capture
|
||||||
:straight nil
|
:straight nil
|
||||||
:config
|
:config
|
||||||
|
(setq my-org-capture-file (concat org-directory "/20260509T232442==agenda--all-my-todos__org.org"))
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
(cond
|
`(("t" "TODO" entry
|
||||||
((or *is-linux* *is-mac*)
|
(file+headline ,my-org-capture-file "Something to do")
|
||||||
'(("t" "TODO" entry
|
"* TODO %<%m-%d> %?\n%T" :empty-lines 1)
|
||||||
(file+headline "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
("s" "STARTED" entry
|
||||||
"* TODO %<%m-%d> %?\n%T"
|
(file+headline ,my-org-capture-file "Something to do")
|
||||||
:empty-lines 1)
|
"* STARTED %<%m-%d> %?\n%T" :empty-lines 1)
|
||||||
("s" "SOMEDAY" entry
|
("S" "SOMEDAY" entry
|
||||||
(file+headline "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
(file+headline ,my-org-capture-file "Something to do")
|
||||||
"* SOMEDAY %<%m-%d> %?\n%T"
|
"* SOMEDAY %<%m-%d> %?\n%T" :empty-lines 1)
|
||||||
:empty-lines 1)
|
|
||||||
("i" "IDKY" entry
|
("i" "IDKY" entry
|
||||||
(file+headline "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
(file+headline ,my-org-capture-file "Something to know")
|
||||||
"* IDKY %<%m-%d> %?\n%T"
|
"* IDKY %<%m-%d> %?\n%T" :empty-lines 1))))
|
||||||
:empty-lines 1)))
|
|
||||||
(*is-android*
|
|
||||||
'(("t" "TODO" entry
|
|
||||||
(file+headline "~/storage/shared/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
|
||||||
"* TODO %<%m-%d> %?\n%T"
|
|
||||||
:empty-lines 1)
|
|
||||||
("s" "SOMEDAY" entry
|
|
||||||
(file+headline "~/storage/shared/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
|
||||||
"* SOMEDAY %<%m-%d> %?\n%T"
|
|
||||||
:empty-lines 1)
|
|
||||||
("i" "IDKY" entry
|
|
||||||
(file+headline "~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org" "Something to do")
|
|
||||||
"* IDKY %<%m-%d> %?\n%T"
|
|
||||||
:empty-lines 1)))
|
|
||||||
(t nil))))
|
|
||||||
|
|
||||||
;; hugo
|
;; hugo
|
||||||
(use-package ox-hugo
|
(use-package ox-hugo
|
||||||
:config
|
:init
|
||||||
(with-eval-after-load 'org-capture
|
(with-eval-after-load 'org-capture
|
||||||
(defun org-hugo-new-subtree-post-capture-template ()
|
(defun org-hugo-new-subtree-post-capture-template ()
|
||||||
"Returns `org-capture' template string for new Hugo post.
|
"Returns `org-capture' template string for new Hugo post.
|
||||||
@@ -248,25 +222,18 @@ See `org-capture-templates' for more information."
|
|||||||
":END:"
|
":END:"
|
||||||
"\n\n") ;Place the cursor here finally
|
"\n\n") ;Place the cursor here finally
|
||||||
"\n")))
|
"\n")))
|
||||||
(if *is-windows*
|
|
||||||
(add-to-list 'org-capture-templates
|
(add-to-list 'org-capture-templates
|
||||||
'("h" ;`org-capture' binding + h
|
`("h" ;`org-capture' binding + h
|
||||||
"Hugo post"
|
"Hugo post"
|
||||||
entry
|
entry
|
||||||
;; 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 "h:/emacs/hugo/this-is-my-blog/all-blog.org" "Blog Ideas")
|
(file+headline ,(if *is-windows*
|
||||||
(function org-hugo-new-subtree-post-capture-template)))
|
"h:/emacs/hugo/this-is-my-blog/all-blog.org"
|
||||||
(add-to-list 'org-capture-templates
|
"~/org/hugo/this-is-my-blog/all-blog.org")
|
||||||
'("h" ;`org-capture' binding + h
|
"Blog Ideas")
|
||||||
"Hugo post"
|
(function org-hugo-new-subtree-post-capture-template)))))
|
||||||
entry
|
|
||||||
;; It is assumed that below file is present in `org-directory'
|
|
||||||
;; and that it has a "Blog Ideas" heading. It can even be a
|
|
||||||
;; symlink pointing to the actual location of all-posts.org!
|
|
||||||
(file+headline "~/org/hugo/this-is-my-blog/all-blog.org" "Blog Ideas")
|
|
||||||
(function org-hugo-new-subtree-post-capture-template))))))
|
|
||||||
|
|
||||||
;; presentation
|
;; presentation
|
||||||
(use-package org-tree-slide)
|
(use-package org-tree-slide)
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ _a_ : all dwim
|
|||||||
|
|
||||||
(use-package consult-jinx
|
(use-package consult-jinx
|
||||||
:straight
|
:straight
|
||||||
(:host github :repo "Andsy10/consult-jinx")))
|
(consult-jinx
|
||||||
|
:type git
|
||||||
|
:host github
|
||||||
|
:repo "Andsy10/consult-jinx")))
|
||||||
|
|
||||||
;; eat,终端
|
;; eat,终端
|
||||||
(unless *is-windows*
|
(unless *is-windows*
|
||||||
@@ -151,9 +154,15 @@ _a_ : all dwim
|
|||||||
'((magit-project-status "Magit" ?v)
|
'((magit-project-status "Magit" ?v)
|
||||||
(eat-project "Eat" ?E)
|
(eat-project "Eat" ?E)
|
||||||
(project-query-replace-regexp "Query Replace" ?R)
|
(project-query-replace-regexp "Query Replace" ?R)
|
||||||
(consult-ripgrep "Ripgrep" ?r))))))
|
(consult-ripgrep "Ripgrep" ?r)
|
||||||
|
(consult-project-buffer "Buffers" ?b)
|
||||||
|
(project-ibuffer "Ibuffer" ?i))))))
|
||||||
|
|
||||||
(use-package ibuffer-projectile)
|
(use-package project-ibuffer
|
||||||
|
:straight
|
||||||
|
(project-ibuffer :type git
|
||||||
|
:host github
|
||||||
|
:repo "Andsy10/project-ibuffer"))
|
||||||
|
|
||||||
;; emms
|
;; emms
|
||||||
(use-package emms
|
(use-package emms
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
(:map markdown-mode-map
|
(:map markdown-mode-map
|
||||||
("C-c C-e" . markdown-do))
|
("C-c C-e" . markdown-do))
|
||||||
:hook
|
:hook
|
||||||
(markdown-mode . toggle-truncate-lines)
|
(markdown-mode . visual-line-mode)
|
||||||
:init
|
:init
|
||||||
(setq markdown-command "multimarkdown"
|
(setq markdown-command "multimarkdown"
|
||||||
markdown-fontify-code-blocks-natively t))
|
markdown-fontify-code-blocks-natively t))
|
||||||
@@ -67,6 +67,10 @@
|
|||||||
(use-package edit-indirect)
|
(use-package edit-indirect)
|
||||||
|
|
||||||
;; html
|
;; html
|
||||||
|
(use-package shr
|
||||||
|
:config
|
||||||
|
(setq shr-inhibit-images nil))
|
||||||
|
|
||||||
(use-package htmlize)
|
(use-package htmlize)
|
||||||
|
|
||||||
(provide 'init-prog)
|
(provide 'init-prog)
|
||||||
|
|||||||
@@ -89,6 +89,9 @@
|
|||||||
;; 优化换行规则
|
;; 优化换行规则
|
||||||
(setq word-wrap-by-category t)
|
(setq word-wrap-by-category t)
|
||||||
|
|
||||||
|
;; 禁用制表符
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
|
||||||
;; 修改mac键位
|
;; 修改mac键位
|
||||||
(when *is-mac*
|
(when *is-mac*
|
||||||
(setq mac-command-modifier 'meta)
|
(setq mac-command-modifier 'meta)
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
search-ring
|
search-ring
|
||||||
regexp-search-ring
|
regexp-search-ring
|
||||||
extended-command-history)
|
extended-command-history)
|
||||||
savehist-ignored-variables '(consult-notes-history)
|
|
||||||
savehist-autosave-interval 300))
|
savehist-autosave-interval 300))
|
||||||
|
|
||||||
(use-package saveplace
|
(use-package saveplace
|
||||||
|
|||||||
@@ -81,6 +81,8 @@
|
|||||||
|
|
||||||
(setq word-wrap-by-category t)
|
(setq word-wrap-by-category t)
|
||||||
|
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
|
||||||
(setq kill-whole-line t)
|
(setq kill-whole-line t)
|
||||||
|
|
||||||
(provide 'init-terminal-startup)
|
(provide 'init-terminal-startup)
|
||||||
|
|||||||
@@ -16,12 +16,14 @@
|
|||||||
'(solarized-emacs :fork (:host github :repo "Andsy10/solarized-emacs"))
|
'(solarized-emacs :fork (:host github :repo "Andsy10/solarized-emacs"))
|
||||||
:init
|
:init
|
||||||
;; 把主题加载延迟到frame创建之后,防止daemon模式下宏不能正常展开
|
;; 把主题加载延迟到frame创建之后,防止daemon模式下宏不能正常展开
|
||||||
(if (daemonp)
|
(if (and (daemonp) (not *is-android*))
|
||||||
(add-hook 'after-make-frame-functions
|
(add-hook 'after-make-frame-functions
|
||||||
(lambda (frame)
|
(lambda (frame)
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
(load-theme 'my-dark t))))
|
(load-theme 'my-dark t))))
|
||||||
(load-theme 'my-dark t)))
|
(if *is-android*
|
||||||
|
(load-theme 'my-light t)
|
||||||
|
(load-theme 'my-dark t))))
|
||||||
|
|
||||||
;; 行号
|
;; 行号
|
||||||
(use-package display-line-numbers
|
(use-package display-line-numbers
|
||||||
@@ -48,8 +50,6 @@
|
|||||||
(use-package rainbow-delimiters)
|
(use-package rainbow-delimiters)
|
||||||
|
|
||||||
;; 很多主题
|
;; 很多主题
|
||||||
;; (use-package doom-themes)
|
|
||||||
;; (use-package color-theme-modern)
|
|
||||||
(use-package naysayer-theme)
|
(use-package naysayer-theme)
|
||||||
(use-package ef-themes)
|
(use-package ef-themes)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user