Emacs : failed.

This commit is contained in:
2023-01-17 16:19:35 +09:00
parent d3dd62be34
commit da7670ff2b

View File

@ -64,28 +64,10 @@ Emacs Configuration for emacs 29.50
(package-refresh-contents)) (package-refresh-contents))
(straight-use-package '(use-package :build t)) (straight-use-package '(use-package :build t))
(setq use-package-always-ensure t) (setq use-package-always-ensure t)
;;(require 'package)
;;(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
;;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
;;(customize-set-variable 'package-archive-priorities
;; '(("gnu" . 99) ; prefer GNU packages
;; ("nongnu" . 80) ; use non-gnu packages if
;; ; not found in GNU elpa
;; ("stable" . 70) ; prefer "released" versions
;; ; from melpa
;; ("melpa" . 0))) ; if all else fails, get it
;; ; from melpa
;; make sure the elpa/ folder exists after setting it above.
;;(defmacro usr-package-install (package)
;; `(unless (package-installed-p ,package) (package-install ,package)))
;;(package-initialize)
;;(if (version< emacs-version "29")
;; (usr-package-install 'use-package)) ;; <emacs29
(unless (file-exists-p package-user-dir) (unless (file-exists-p package-user-dir)
(mkdir package-user-dir t)) (mkdir package-user-dir t))
;;; init.el ends here
;;; init.el ends here
#+end_src #+end_src
*** Add other modules *** Add other modules
#+begin_src emacs-lisp :tangle ~/.config/emacs/init.el #+begin_src emacs-lisp :tangle ~/.config/emacs/init.el
@ -175,18 +157,18 @@ Emacs Configuration for emacs 29.50
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(custom-set-faces (custom-set-faces
`(default ((t (:font "Fira Code 14")))) `(default ((t (:font "Fira Code 11"))))
`(fixed-pitch ((t (:inherit (default))))) `(fixed-pitch ((t (:inherit (default)))))
`(fixed-pitch-serif ((t (:inherit (default))))) `(fixed-pitch-serif ((t (:inherit (default)))))
`(variable-pitch ((t (:font "Ubuntu 14"))))))) `(variable-pitch ((t (:font "Ubuntu 11")))))))
(require 'custom-ui) (require 'custom-ui)
(require 'custom-keybindings) (require 'custom-keybindings)
(require 'custom-default) (require 'custom-default)
(require 'custom-completion) (require 'custom-completion)
;;(require 'custom-projects) (require 'custom-projects)
;;(require 'custom-latex) (require 'custom-latex)
;;(require 'custom-org) (require 'custom-org)
;;(require 'custom-workspaces) ;;(require 'custom-workspaces)
;;(require 'custom-languages) ;;(require 'custom-languages)
;;(require 'custom-extra) ;;(require 'custom-extra)
@ -215,7 +197,7 @@ emacs built-in package config
(has-path (not (string-match "^fatal" git-output)))) (has-path (not (string-match "^fatal" git-output))))
(if (not has-path) (if (not has-path)
(abbreviate-file-name current-path) (abbreviate-file-name current-path)
(string-remove-prefix (file-name-directory git-output) current-path)))) (string-remove-prefix (file-name-directory git-output) current-path))))
(defun ju/eshell-prompt () (defun ju/eshell-prompt ()
(let ((current-branch (magit-get-current-branch))) (let ((current-branch (magit-get-current-branch)))
@ -270,8 +252,8 @@ emacs built-in package config
:custom ((dired-listing-switches "-agho --group-directories-first")) :custom ((dired-listing-switches "-agho --group-directories-first"))
:config :config
(evil-collection-define-key 'normal 'dired-mode-map (evil-collection-define-key 'normal 'dired-mode-map
"h" 'dired-up-directory ;dired-single-up-directory "h" 'dired-single-up-directory
"l" 'dired-find-file)) ;dired-single-buffer) "l" 'dired-single-buffer))
(use-package dired-single (use-package dired-single
:straight (:build t) :straight (:build t)
:defer t :defer t
@ -289,8 +271,8 @@ emacs built-in package config
(use-package diff-hl (use-package diff-hl
:straight (:build t) :straight (:build t)
:defer t :defer t
:hook ((dired-mode-hook . diff-hl-dired-mode-unless-remote) :hook ((dired-mode . diff-hl-dired-mode-unless-remote)
(magit-post-refresh-hook . diff-hl-magit-post-refresh)) (magit-post-refresh . diff-hl-magit-post-refresh))
:config :config
(diff-hl-margin-mode)) (diff-hl-margin-mode))
(use-package dired-rsync (use-package dired-rsync
@ -310,7 +292,6 @@ emacs built-in package config
(evil-collection-define-key 'normal 'dired-mode-map (evil-collection-define-key 'normal 'dired-mode-map
"H" 'dired-hide-dotfiles-mode)) "H" 'dired-hide-dotfiles-mode))
;;(usr-package-install 'peep-dired)
;; HACK:Fixes #1929: icons break file renaming in Emacs 27+, because the icon ;; HACK:Fixes #1929: icons break file renaming in Emacs 27+, because the icon
;; is considered part of the filename, so we disable icons while we're in ;; is considered part of the filename, so we disable icons while we're in
;; wdired-mode. ;; wdired-mode.
@ -324,7 +305,7 @@ emacs built-in package config
(use-package peep-dired (use-package peep-dired
:straight (:build t) :straight (:build t)
:defer t :defer t
:hook (peep-dired-hook . evil-normalize-keymaps) :hook (peep-dired . evil-normalize-keymaps)
:config :config
(evil-define-key 'normal peep-dired-mode-map (evil-define-key 'normal peep-dired-mode-map
(kbd "j") 'peep-dired-next-file (kbd "j") 'peep-dired-next-file
@ -424,6 +405,7 @@ emacs built-in package config
(interactive) (interactive)
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t) visual-fill-column-center-text t)
(visual-line-mode t)
(visual-fill-column-mode t)) (visual-fill-column-mode t))
(use-package visual-fill-column (use-package visual-fill-column
@ -564,7 +546,7 @@ for managing keybindings.
"b K" '(kill-buffer :which-key "IBuffer Kill Buffers") "b K" '(kill-buffer :which-key "IBuffer Kill Buffers")
;; Eshell ;; Eshell
"e" '(:ignore t :which-key "eshell") "e" '(:ignore t :which-key "eshell")
"e h" '(counsel-esh-history :which "Kill history") "e h" '(counsel-esh-history :which-key "Kill history")
"e s" '(eshell :which-key "run eshell") "e s" '(eshell :which-key "run eshell")
"e e" '(elfeed :which-key "elfeed") "e e" '(elfeed :which-key "elfeed")
;; Counsel ;; Counsel
@ -578,11 +560,6 @@ for managing keybindings.
"f o c" '((lambda () (interactive) (find-file "~/.config/emacs/emacs.org")) :which-key "open emacs config") "f o c" '((lambda () (interactive) (find-file "~/.config/emacs/emacs.org")) :which-key "open emacs config")
;; Insert something ;; Insert something
"i" '(:ignore t :which-key "insert something.") "i" '(:ignore t :which-key "insert something.")
;; Org mode
"o" '(:ignore t :which-key "org mode")
"o a" '(:ignore t :which-key "org agenda")
"o a c" '((lambda () (interactive) (find-file (expand-file-name "agenda/agenda.org" org-directory))) :which-key "org agenda file")
"o c" '(cfw:open-org-calendar :which-key "org calendar")
;; Project-el ;; Project-el
"p" '(:ignore t :which-key "project") "p" '(:ignore t :which-key "project")
"p ." '(project-switch-project :which-key "switch project") "p ." '(project-switch-project :which-key "switch project")
@ -721,17 +698,6 @@ https://github.com/SystemCrafters/crafted-emacs
(vertico-cycle t) (vertico-cycle t)
:init :init
(vertico-mode)) (vertico-mode))
;;(use-package vertico
;; :straight (:build t)
;; :ensure t
;; :bind (:map vertico-map
;; ("C-j" 'vertico-next)
;; ("C-k" 'vertico-previous)
;; ("M-h" 'vertico-directory-up))
;; :custom
;; (vertico-cycle t)
;; :config
;; (vertico-mode))
#+end_src #+end_src
**** Prescient **** Prescient
simple but effective sorting and filtering for emacs. simple but effective sorting and filtering for emacs.
@ -860,72 +826,91 @@ Quick Action in minibuffer
**** Normal Function **** Normal Function
***** configure org ***** configure org
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-contrib)
(setq org-directory "~/org") ; use for relative file location (setq org-directory "~/org") ; use for relative file location
;; hooks (use-package org
(add-hook 'org-mode-hook #'org-indent-mode) :straight (:build t)
(setq org-todo-keywords :defer t
'((sequence "TODO(t)" "HOLD(h)" "|" "KILL(k)" "DONE(d)"))) :config
(setq org-ellipsis " ⤵" (add-hook 'org-mode-hook #'org-indent-mode)
org-hide-emphasis-markers t (setq org-todo-keywords
org-image-actual-width 600 '((sequence "TODO(t)" "HOLD(h)" "|" "KILL(k)" "DONE(d)")))
org-redisplay-inline-images t (setq org-ellipsis " ⤵"
org-display-inline-images t org-hide-emphasis-markers t
org-startup-with-inline-images "inlineimages" org-image-actual-width 600
org-src-fontify-natively t org-redisplay-inline-images t
org-fontify-quote-and-verse-blocks t org-display-inline-images t
org-agenda-start-with-log-mode t org-startup-with-inline-images "inlineimages"
org-startup-indented t org-src-fontify-natively t
org-startup-align-all-tables t org-fontify-quote-and-verse-blocks t
org-log-done 'time org-agenda-start-with-log-mode t
org-log-into-drawer "LOGBOOK" org-startup-indented t
org-clock-into-drawer "CLOCKING" org-startup-align-all-tables t
org-lowest-priority 68) org-log-done 'time
;;(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8)) org-log-into-drawer "LOGBOOK"
org-clock-into-drawer "CLOCKING"
org-lowest-priority 68)
;;(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8))
(setq org-use-sub-superscripts (quote {})) (setq org-use-sub-superscripts '{})
;; Do not ask when run code block ;; Do not ask when run code block
(setq org-confirm-babel-evaluate nil) (setq org-confirm-babel-evaluate nil)
(custom-set-faces (custom-set-faces
'(org-level-1 ((t (:height 1.7 :weight ultra-bold :foreground "#81a2be")))) ;; :foreground "#81a2be" '(org-level-1 ((t (:height 1.7 :weight ultra-bold :foreground "#81a2be")))) ;; :foreground "#81a2be"
'(org-level-2 ((t (:height 1.6 :weight extra-bold :foreground "#b294bb")))) ;; :foreground "#b294bb" '(org-level-2 ((t (:height 1.6 :weight extra-bold :foreground "#b294bb")))) ;; :foreground "#b294bb"
'(org-level-3 ((t (:height 1.5 :weight bold :foreground "#b5bd68")))) ;; :foreground "#b5bd68" '(org-level-3 ((t (:height 1.5 :weight bold :foreground "#b5bd68")))) ;; :foreground "#b5bd68"
'(org-level-4 ((t (:height 1.4 :weight semi-bold :foreground "#e6c547")))) ;; :foreground "#e6c547" '(org-level-4 ((t (:height 1.4 :weight semi-bold :foreground "#e6c547")))) ;; :foreground "#e6c547"
'(org-level-5 ((t (:height 1.3 :weight normal :foreground "#cc6666")))) ;; :foreground "#cc6666" '(org-level-5 ((t (:height 1.3 :weight normal :foreground "#cc6666")))) ;; :foreground "#cc6666"
'(org-level-6 ((t (:height 1.2 :weight normal :foreground "#70c0ba")))) ;; :foreground "#70c0ba" '(org-level-6 ((t (:height 1.2 :weight normal :foreground "#70c0ba")))) ;; :foreground "#70c0ba"
'(org-level-7 ((t (:height 1.1 :weight normal :foreground "#b77ee0")))) ;; :foreground "#b77ee0" '(org-level-7 ((t (:height 1.1 :weight normal :foreground "#b77ee0")))) ;; :foreground "#b77ee0"
'(org-level-8 ((t (:height 1.0 :weight normal :foreground "#9ec400")))) '(org-level-8 ((t (:height 1.0 :weight normal :foreground "#9ec400"))))
'(org-document-title ((t (:height 2.0 :weight ultra-bold :foreground "#9ec400"))))) '(org-document-title ((t (:height 2.0 :weight ultra-bold :foreground "#9ec400")))))
(setq org-use-sub-superscripts '{}) ;; org latex preview scaled.
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.5))
;; odt -> docx
(setq org-odt-preferred-output-format "docx" ;; opt -> docx
org-export-with-sub-superscripts '{} ;; ODT export to docx
org-latex-compiler "xelatex"))
(use-package org-contrib
:straight (:build t)
:after org
:defer t)
#+end_src #+end_src
***** Org fancy Priorities ***** Org fancy Priorities
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-fancy-priorities) (use-package org-fancy-priorities
;;(setq org-fancy-priorities-list '("⚡" "⬆" "⬇" "☕")) :straight (:build t)
(add-hook 'org-mode-hook #'org-fancy-priorities-mode) :defer t
(add-hook 'org-agenda-mode-hook #'org-fancy-priorities-mode) :after (org all-the-icons)
(setq org-fancy-priorities-list `(,(all-the-icons-faicon "flag" :height 1.1 :v-adjust 0.0) :hook (org-mode org-agenda-mode)
,(all-the-icons-faicon "arrow-up" :height 1.1 :v-adjust 0.0) :config
,(all-the-icons-faicon "square" :height 1.1 :v-adjust 0.0) (setq org-fancy-priorities-list `(,(all-the-icons-faicon "flag" :height 1.1 :v-adjust 0.0)
,(all-the-icons-faicon "ban" :height 1.1 :v-adjust 0.0))) ,(all-the-icons-faicon "arrow-up" :height 1.1 :v-adjust 0.0)
,(all-the-icons-faicon "square" :height 1.1 :v-adjust 0.0)
,(all-the-icons-faicon "ban" :height 1.1 :v-adjust 0.0))))
#+end_src #+end_src
***** Org superstar ***** Org superstar
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-superstar) (use-package org-superstar
(setq org-superstar-item-bullet-alist :straight (:build t)
'((?+ . ?➢) ;;:defer t
(?* . ?✰) :hook (org-mode)
(?- . ?➸))) :config
(add-hook 'org-mode-hook #'org-superstar-mode) (setq org-superstar-item-bullet-alist
'((?+ . ?➢)
(?* . ?✰)
(?- . ?➸))))
#+end_src #+end_src
***** Valign ***** Valign
| 12345678 | | | 12345678 | |
|----------+---| |----------+---|
| 일이삼사 | | | 일이삼사 | |
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'valign) (use-package valign
(customize-set-variable 'valign-fancy-bar t) :straight (:build t)
:defer t
:custom
(valign-fancy-bar t))
#+end_src #+end_src
***** Emphasize text ***** Emphasize text
bold : *bold* bold : *bold*
@ -936,37 +921,43 @@ code : ~code~
strike-through : +strike-through+ strike-through : +strike-through+
***** Org Appear ***** Org Appear
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-appear) (use-package org-appear
(add-hook 'org-mode-hook #'org-appear-mode) :straight (:build t)
(setq org-appear-autoemphasis t :defer t
org-appear-autolinks t :hook (org-mode)
org-appear-autoentities t :config
org-appear-autosubmarkers t) (setq org-appear-autoemphasis t
org-appear-autolinks t
org-appear-autoentities t
org-appear-autosubmarkers t))
#+end_src #+end_src
***** Org fragtog ***** Org fragtog
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-fragtog) (use-package org-fragtog
(add-hook 'org-mode-hook #'org-fragtog-mode) :straight (:build t)
#+end_src :defer t
***** Org latex preview :hook (org-mode))
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.5))
#+end_src #+end_src
**** Attachment **** Attachment
***** Org attach screenshot (linux) ***** Org attach screenshot (linux)
to use org-screenshot-take to use org-screenshot-take
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-attach-screenshot) (use-package org-attach-screenshot
:straight (:build t)
:defer t)
#+end_src #+end_src
***** Org download ***** Org download
download image link download image link
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-download) (use-package org-download
:straight (:build t))
#+end_src #+end_src
#+DOWNLOADED: https://avatars.githubusercontent.com/u/74564409?s=120&v=4 @ 2023-01-17 14:15:54
***** ob-latex-as-png ***** ob-latex-as-png
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'ob-latex-as-png) (use-package ob-latex-as-png
(require 'ob-latex-as-png) :straight (:build t))
#+end_src #+end_src
****** Example 1 ****** Example 1
@ -1071,20 +1062,12 @@ download image link
)) ))
#+end_src #+end_src
**** Exporter **** Exporter
export with ^, _ character
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
;; ODT export to docx
(setq org-odt-preferred-output-format "docx"
org-export-with-sub-superscripts '{}
org-latex-compiler "xelatex")
;;
(dolist (ext '("bbl" "lot"))
(add-to-list 'org-latex-logfiles-extensions ext t))
#+end_src
***** Hugo ***** Hugo
my-blog jaeus.net my-blog jaeus.net
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'ox-hugo) (use-package ox-hugo
:straight (:build t)
:defer t)
#+end_src #+end_src
***** TODO Engrave-faces ***** TODO Engrave-faces
latex export code block latex export code block
@ -1098,40 +1081,36 @@ latex export code block
**** Additional Functions **** Additional Functions
***** Org Journal ***** Org Journal
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-journal) (use-package org-journal
(setq org-journal-dir (expand-file-name "journal/" org-directory)) :straight (:build t)
(setq org-journal-file-type 'weekly) :defer t
(ju/leader-key-def :config
"n j" '(:ignore t :which-key "Org Journal") (setq org-journal-dir (expand-file-name "journal/" org-directory))
"n j j" '(org-journal-new-entry :which-key "new Entry") (setq org-journal-file-type 'weekly))
"n j J" '(org-journal-new-scheduled-entry :which-key "New Scheduled entry")
"n j s" '(org-journal-search :which-key "Journal Search"))
#+end_src #+end_src
***** Org Roam ***** Org Roam
+ TODO: Project todos + TODO: Project todos
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-roam) (use-package org-roam
:straight (:build t)
:ensure t
:custom
(org-roam-directory "~/org/roam")
(org-roam-completion-everywhere t)
:config
(org-roam-db-autosync-mode))
;;(my/org-roam-refresh-agenda-list) ;;(my/org-roam-refresh-agenda-list)
(setq org-roam-v2-ack t)
(customize-set-variable 'org-roam-directory "~/org/roam")
(customize-set-variable 'org-roam-completion-everywhere t)
(org-roam-db-autosync-mode)
;; Org roam ui ;; Org roam ui
(usr-package-install 'org-roam-ui) (use-package org-roam-ui
(setq org-roam-ui-sync-theme t :straight (:build t)
org-roam-ui-follow t :defer t
org-roam-ui-update-on-save t :config
org-roam-ui-open-on-start nil) (setq org-roam-ui-sync-theme t
(ju/leader-key-def org-roam-ui-follow t
"n r" '(:ignore t :which-key "Org Roam") org-roam-ui-update-on-save t
"n r u" 'org-roam-ui-open org-roam-ui-open-on-start nil))
"n r l" 'org-roam-buffer-toggle
"n r f" 'org-roam-node-find
"n r i" 'org-roam-node-insert
"n r I" 'org-roam-node-insert-immediate
"n r p" 'my/org-roam-find-project)
;;:desc "org roam refresh agenda list" ;;:desc "org roam refresh agenda list"
;;"oar" 'my/org-roam-refresh-agenda-list ;;"oar" 'my/org-roam-refresh-agenda-list
;;:desc "org roam find tag:project" ;;:desc "org roam find tag:project"
@ -1145,49 +1124,54 @@ latex export code block
#+end_src #+end_src
***** Org Super Agenda ***** Org Super Agenda
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-super-agenda) (use-package org-super-agenda
(org-super-agenda-mode 1) :straight (:build t)
(setq org-agenda-custom-commands :defer t
'(("z" "Org mode super agenda" :init
((alltodo "" ((org-agenda-overriding-header "") (org-super-agenda-mode 1)
(org-super-agenda-groups :config
'((:name "Important" (setq org-agenda-custom-commands
:tag "Important" '(("z" "Org mode super agenda"
:priority "A" ((alltodo "" ((org-agenda-overriding-header "")
:order 6) (org-super-agenda-groups
(:name "Due Today" '((:name "Important"
:deadline today :tag "Important"
:order 2) :priority "A"
(:name "Due Soon" :order 6)
:deadline future (:name "Due Today"
:order 8) :deadline today
(:name "Overdue" :order 2)
:deadline past (:name "Due Soon"
:order 7) :deadline future
(:name "Projects" :order 8)
:tag "Project" (:name "Overdue"
:order 14) :deadline past
(:name "To read" :order 7)
:tag "Read" (:name "Projects"
:order 30) :tag "Project"
(:name "Waiting" :order 14)
:todo "WAIT" (:name "To read"
:order 20) :tag "Read"
(:name "Holding" :order 30)
:todo "HOLD" (:name "Waiting"
:order 21) :todo "WAIT"
(:name "trivial" :order 20)
:priority<= "C" (:name "Holding"
:tag ("Trivial" "Unimportant") :todo "HOLD"
:order 90) :order 21)
(:discard (:tag ("Chore" "Routine" "Daily"))))))))))) (:name "trivial"
:priority<= "C"
:tag ("Trivial" "Unimportant")
:order 90)
(:discard (:tag ("Chore" "Routine" "Daily"))))))))))))
#+end_src #+end_src
**** Tools **** Tools
***** ob-async ***** ob-async
asynchronous execution of org-babel src blocks asynchronous execution of org-babel src blocks
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'ob-async) (use-package ob-async
(require 'ob-async) :straight (:build t)
:defer t)
#+end_src #+end_src
some language should add some language should add
@ -1197,16 +1181,34 @@ some language should add
***** Org PDF tools ***** Org PDF tools
get link from pdf, get link from pdf,
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(usr-package-install 'org-pdftools) (use-package org-pdftools
(add-hook 'org-mode-hook #'org-pdftools-setup-link) :straight (:build t)
:defer t
:hook (org-mode . org-pdftools-setup-link))
#+end_src #+end_src
**** Keybindings **** Keybindings
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
(ju/leader-key-def (ju/leader-key-def
;; Org mode
"o" '(:ignore t :which-key "Org mode") "o" '(:ignore t :which-key "Org mode")
"o a" '(:ignore t :which-key "Org Agenda") "o a" '(:ignore t :which-key "Org Agenda")
"o a a" '(org-agenda :which-key "open org agenda")
"o a r" '(my/org-roam-refresh-agenda-list :which-key "Org agenda refresh list") "o a r" '(my/org-roam-refresh-agenda-list :which-key "Org agenda refresh list")
"o a a" '(org-agenda :which-key "open org agenda")) "o a c" '((lambda () (interactive) (find-file (expand-file-name "agenda/agenda.org" org-directory))) :which-key "org agenda file")
"o c" '(cfw:open-org-calendar :which-key "org calendar"))
(ju/leader-key-def
"n j" '(:ignore t :which-key "Org Journal")
"n j j" '(org-journal-new-entry :which-key "new Entry")
"n j J" '(org-journal-new-scheduled-entry :which-key "New Scheduled entry")
"n j s" '(org-journal-search :which-key "Journal Search"))
(ju/leader-key-def
"n r" '(:ignore t :which-key "Org Roam")
"n r u" 'org-roam-ui-open
"n r l" 'org-roam-buffer-toggle
"n r f" 'org-roam-node-find
"n r i" 'org-roam-node-insert
"n r I" 'org-roam-node-insert-immediate
"n r p" 'my/org-roam-find-project)
#+end_src #+end_src
**** Provide Modules **** Provide Modules
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el
@ -1216,13 +1218,14 @@ get link from pdf,
*** Projects *** Projects
**** MAGIT **** MAGIT
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
(usr-package-install 'magit) (use-package magit
;;(use-package magit) :straight (:build t)
(require 'magit) :defer t
;;(magit-status magit-get-current-branch) :commands (magit-status magit-get-current-branch)
;; ;;:custom :custom
(setq magit-clone-default-directory "~/Project/" (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) :config
(setq magit-clone-default-directory "~/Project/"))
(ju/leader-key-def (ju/leader-key-def
;; Magit ;; Magit
"g" '(:ignore t :which-key "magit") "g" '(:ignore t :which-key "magit")
@ -1230,9 +1233,12 @@ get link from pdf,
#+end_src #+end_src
**** Gitgutter **** Gitgutter
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
(usr-package-install 'git-gutter) (use-package git-gutter
(global-git-gutter-mode) :straight (:build t)
(setq git-gutter:update-interval 2) :defer t
:init (global-git-gutter-mode)
:config
(setq git-gutter:update-interval 2))
#+end_src #+end_src
**** Forge **** Forge
Git forge Git forge
@ -1241,36 +1247,40 @@ Git forge
**** Highlight TODOs **** Highlight TODOs
***** TODO: test ***** TODO: test
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
(usr-package-install 'hl-todo) (use-package hl-todo
(require 'hl-todo) :straight (:build t)
(setq hl-todo-keyword-faces :defer t
`(;; For things that need to be done, just not today. :init (global-hl-todo-mode 1)
("TODO" warning bold) :config
;; For problems that will become bigger problems later if not (setq hl-todo-keyword-faces
;; fixed ASAP. `(;; For things that need to be done, just not today.
("FIXME" error bold) ("TODO" warning bold)
;; For tidbits that are unconventional and not intended uses of the ;; For problems that will become bigger problems later if not
;; constituent parts, and may break in a future update. ;; fixed ASAP.
("HACK" font-lock-constant-face bold) ("FIXME" error bold)
;; For things that were done hastily and/or hasn't been thoroughly ;; For tidbits that are unconventional and not intended uses of the
;; tested. It may not even be necessary! ;; constituent parts, and may break in a future update.
("REVIEW" font-lock-keyword-face bold) ("HACK" font-lock-constant-face bold)
;; For especially important gotchas with a given implementation, ;; For things that were done hastily and/or hasn't been thoroughly
;; directed at another user other than the author. ;; tested. It may not even be necessary!
("NOTE" success bold) ("REVIEW" font-lock-keyword-face bold)
;; For things that just gotta go and will soon be gone. ;; For especially important gotchas with a given implementation,
("DEPRECATED" font-lock-doc-face bold) ;; directed at another user other than the author.
;; For a known bug that needs a workaround ("NOTE" success bold)
("BUG" error bold) ;; For things that just gotta go and will soon be gone.
;; For warning about a problematic or misguiding code ("DEPRECATED" font-lock-doc-face bold)
("XXX" font-lock-constant-face bold))) ;; For a known bug that needs a workaround
(global-hl-todo-mode 1) ("BUG" error bold)
;; For warning about a problematic or misguiding code
("XXX" font-lock-constant-face bold))))
#+end_src #+end_src
**** Magit TODOs **** Magit TODOs
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
(usr-package-install 'magit-todos) (use-package magit-todos
(require 'magit-todos) :straight (:build t)
(add-hook 'magit-mode-hook #'magit-todos-mode) :defer t
:after (magit hl-todo)
:hook (magit-mode))
#+end_src #+end_src
**** Provide Modules **** Provide Modules
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el
@ -1325,39 +1335,36 @@ Git forge
**** AUCTEX **** AUCTEX
writing and formatting tex file in Emacs. writing and formatting tex file in Emacs.
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el
(usr-package-install 'auctex) (use-package auctex
(with-eval-after-load 'latex :straight (:build t)
(customize-set-variable 'TeX-auto-save t) :defer t
(customize-set-variable 'TeX-parse-self t) :custom
(TeX-auto-save t)
(TeX-parse-self t)
;; to use pdfview with auctex
(TeX-view-program-selection '((output-pdf "PDF Tools")))
(TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
(TeX-source-correlate-start-server t)
;; electric pairs in auctex
(TeX-electric-sub-and-superscript t)
(LaTeX-electric-left-right-brace t)
(TeX-electric-math (cons "$" "$"))
:config
(setq-default TeX-master nil) (setq-default TeX-master nil)
;; compile to pdf ;; compile to pdf
(tex-pdf-mode) (tex-pdf-mode)
;; correlate the source and the output ;; correlate the source and the output
(TeX-source-correlate-mode) (TeX-source-correlate-mode)
;; set a correct indentation in a few additional environments ;; set a correct indentation in a few additional environments
(add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation)) (add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation))
(add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular)) (add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular))
(add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation)) (add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation))
;; add a few macros and environment as verbatim ;; add a few macros and environment as verbatim
(add-to-list 'LaTeX-verbatim-environments "lstlisting") (add-to-list 'LaTeX-verbatim-environments "lstlisting")
(add-to-list 'LaTeX-verbatim-environments "Verbatim") (add-to-list 'LaTeX-verbatim-environments "Verbatim")
(add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline") (add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline")
(add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline") (add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline")
;; to use pdfview with auctex
(customize-set-variable 'TeX-view-program-selection '((output-pdf "PDF Tools")))
(customize-set-variable 'TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
(customize-set-variable 'TeX-source-correlate-start-server t)
;; electric pairs in auctex
(customize-set-variable 'TeX-electric-sub-and-superscript t)
(customize-set-variable 'LaTeX-electric-left-right-brace t)
(customize-set-variable 'TeX-electric-math (cons "$" "$"))
;; open all buffers with the math mode and auto-fill mode ;; open all buffers with the math mode and auto-fill mode
(add-hook 'LaTeX-mode-hook #'auto-fill-mode) (add-hook 'LaTeX-mode-hook #'auto-fill-mode)
(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode) (add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)
@ -1372,15 +1379,19 @@ writing and formatting tex file in Emacs.
**** Cdlatex **** Cdlatex
speed-up insertion of environments and math templates. speed-up insertion of environments and math templates.
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el
(usr-package-install 'cdlatex) (use-package cdlatex
(add-hook 'org-mode-hook #'org-cdlatex-mode) :straight (:build t)
(add-hook 'LaTeX-mode-hook #'cdlatex-mode) :hook
(setq cdlatex-use-dollar-to-ensure-math nil) ((org-mode . org-cdlatex-mode)
(LaTex-mode . cdlatex-mode))
:config
(setq cdlatex-use-dollar-to-ensure-math nil))
#+end_src #+end_src
**** Preview pane **** Preview pane
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el
(usr-package-install 'latex-preview-pane) (use-package latex-preview-pane
(require 'latex-preview-pane) :straight (:build t)
:defer t)
#+end_src #+end_src
**** Provide Modules **** Provide Modules
#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-latex.el