diff --git a/.config/emacs/custom-themes/morning-star-theme.el b/.config/emacs-my/custom-themes/morning-star-theme.el similarity index 100% rename from .config/emacs/custom-themes/morning-star-theme.el rename to .config/emacs-my/custom-themes/morning-star-theme.el diff --git a/.config/emacs/desktop.org b/.config/emacs-my/desktop.org similarity index 100% rename from .config/emacs/desktop.org rename to .config/emacs-my/desktop.org diff --git a/.config/emacs/emacs.org b/.config/emacs-my/emacs.org similarity index 97% rename from .config/emacs/emacs.org rename to .config/emacs-my/emacs.org index 76020fc..3b677f7 100755 --- a/.config/emacs/emacs.org +++ b/.config/emacs-my/emacs.org @@ -64,51 +64,11 @@ Emacs Configuration for emacs 29.50 (customize-set-variable 'package-user-dir (expand-file-name "elpa/" user-emacs-directory)) - ;; TODO - ;;(package-initialize) - ;;(unless package-archive-contents - ;; (package-refresh-contents)) (unless (package-installed-p 'use-package) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure t) - - (use-package auto-package-update - :custom - (auto-package-update-interval 7) - (auto-package-update-prompt-before-update t) - (auto-package-update-hide-results t) - :config - (auto-package-update-maybe) - (auto-package-update-at-time "09:00")) -#+end_src -**** Straight -#+begin_src emacs-lisp -;;#+begin_src emacs-lisp :tangle ~/.config/emacs/init.el - (defvar bootstrap-version) - (defvar comp-deferred-compilation-deny-list ()) ; workaround, otherwise straight shits itself - (let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) - (package-initialize) - (unless package-archive-contents - (package-refresh-contents)) - (setq straight-use-package-by-default t) - (straight-use-package 'use-package) - (setq use-package-always-ensure t) - - (unless (file-exists-p package-user-dir) - (mkdir package-user-dir t)) - ;;; init.el ends here #+end_src *** Add other modules #+begin_src emacs-lisp :tangle ~/.config/emacs/init.el @@ -207,6 +167,10 @@ Emacs Configuration for emacs 29.50 (unless (display-graphic-p) (xterm-mouse-mode)) #+end_src +* Define some unused variable. +#+begin_src emacs-lisp :tangle ~/.config/emacs/config.el + (setq global-linum-mode nil) +#+end_src * Modules Selection module #+begin_src emacs-lisp :tangle ~/.config/emacs/config.el ;;; config.el -*- lexical-binding: t; -*- @@ -225,15 +189,15 @@ Emacs Configuration for emacs 29.50 (add-hook 'emacs-startup-hook (lambda () (custom-set-faces - `(default ((t (:font "Fira Code 16")))) + `(default ((t (:font "Fira Code Nerd Font 13")))) `(fixed-pitch ((t (:inherit (default))))) `(fixed-pitch-serif ((t (:inherit (default))))) - `(variable-pitch ((t (:font "Ubuntu 16"))))))) + `(variable-pitch ((t (:font "Ubuntu 13"))))))) (require 'custom-ui) (require 'custom-keybindings) (require 'custom-default) - ;;(require 'custom-completion) + (require 'custom-completion) ;;(require 'custom-edit) ;;(require 'custom-projects) ;;(require 'custom-latex) @@ -316,6 +280,7 @@ emacs built-in package config #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-default.el (use-package dired :ensure nil + :straight (:type built-in) :commands (dired dired-jump) :bind (("C-x C-j" . dired-jump)) :custom ((dired-listing-switches "-agho --group-directories-first")) @@ -533,7 +498,6 @@ emacs built-in package config **** Dashboard #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-ui.el (use-package dashboard - :disabled :after all-the-icons :config (setq dashboard-set-heading-icons t) @@ -888,7 +852,6 @@ Quick Action in minibuffer ;; (corfu-scroll-margin 5) ;; Use scroll margin :init (global-corfu-mode)) - ;; load extension (add-to-list 'load-path (expand-file-name "straight/build/corfu/extensions" @@ -958,7 +921,6 @@ Quick Action in minibuffer #+end_src **** Snippet #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-edit.el - (use-package yasnippet :defer t :hook (prog-mode . yas-minor-mode) @@ -972,8 +934,8 @@ Quick Action in minibuffer ***** Doom-Snippet #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-edit.el (use-package doom-snippets - :after yasnippet - :straight (doom-snippets :type git :host github :repo "doomemacs/snippets" :files ("*.el" "*"))) + :straight (doom-snippets :type git :host github :repo "doomemacs/snippets" :files ("*.el" "*")) + :after yasnippet) #+end_src **** Emojify @@ -1099,7 +1061,7 @@ Quick Action in minibuffer ***** Valign | 12345678 | | |----------+---| -| 일이삼사 | | +| 일이삼사 | | #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el (use-package valign :defer t @@ -1341,6 +1303,7 @@ latex export code block ***** Org Roam #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-org.el (use-package org-roam + :ensure t ;;:demand t ;; ensure org-roam is loaded by default :custom (org-roam-directory "~/org/roam") @@ -1474,12 +1437,9 @@ get link from pdf, (use-package git-gutter :defer t :init (global-git-gutter-mode) - :config - (setq git-gutter:update-interval 2)) -#+end_src -**** Forge -Git forge -#+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-projects.el + :custom + (git-gutter:update-interval 2) + (git-gutter:linum-enabled nil)) #+end_src **** Highlight TODOs ***** TODO: test @@ -1728,7 +1688,7 @@ https://github.com/xenodium/chatgpt-shell **** Python #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-languages.el (use-package jupyter - :defer t) + :ensure t) #+end_src **** CMAKE #+begin_src emacs-lisp :mkdirp yes :tangle ~/.config/emacs/modules/custom-languages.el @@ -1803,10 +1763,10 @@ LSP -> veriloter 'org-babel-load-languages '((emacs-lisp . t) (python . t) - (jupyter . t) + ;;(jupyter . t) (dot . t) (latex . t))) - (org-babel-jupyter-override-src-block "python") + ;;(org-babel-jupyter-override-src-block "python") (push '("conf-unix" . conf-unix) org-src-lang-modes) ;; This is needed as of Org 9.2 (require 'org-tempo) diff --git a/.config/emacs/.gitignore b/.config/emacs/.gitignore deleted file mode 100644 index fc5f436..0000000 --- a/.config/emacs/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# generated from emacs.org -* -!*.org -!modules/* -!custom-themes/* diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el new file mode 100644 index 0000000..eabbdbd --- /dev/null +++ b/.config/emacs/early-init.el @@ -0,0 +1,36 @@ +;;; early-init.el -*- lexical-binding: t -*- +;; do not garbage collection during startup +(setq gc-cons-threshold most-positive-fixnum) +;; prefers newest version of a file +(customize-set-variable 'load-prefer-newer t) + +;;; Native compilation settings +(when (featurep 'native-compile) + ;; Silence compiler warnings as they can be pretty disruptive + (setq native-comp-async-report-warnings-errors nil) + (setq native-comp-deferred-compilation nil)) + + +(setq package-enable-at-startup nil) +;; built-in use-package, set before loading +(setq use-package-enable-imenu-support t) + +;; +(setq non-prefer-newer noninteractive) +(setq frame-inhibit-implied-resize t) + +(push '(menu-bar-lines . 0) default-frame-alist) +(push '(tool-bar-lines . 0) default-frame-alist) +(push '(vertical-scroll-bars) default-frame-alist) +(when (featurep 'ns) + (push '(ns-transparent-titlebar . t) default-frame-alist)) +(setq-default mode-line-format nil) + +(setq inhibit-startup-message nil) + +;; initial load with blue theme +;(load-theme 'deeper-blue) + +;;(customize-set-variable 'initial-major-mode 'fundamental-mode) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; early-init.el ends here diff --git a/.config/emacs/elfeed.org b/.config/emacs/elfeed.org deleted file mode 100755 index dd0b0cb..0000000 --- a/.config/emacs/elfeed.org +++ /dev/null @@ -1,20 +0,0 @@ -#+title: Rss -* root :elfeed: -** News :news: -*** [[https://www.phoronix.com/rss.php][phoronix]] :phoronix: -*** [[https://www.computerworld.com/index.rss][Computer world]] :computerworld: -*** [[https://coolenjoy.net/rss?bo_table=38][Coolenjoy]] :coolenjoy: -*** [[https://gigglehd.com/gg/ggnews/rss][GiggleHardware]] :gigglehd: -** Paper :study: -*** [[https://arxiv.org/rss/cs][Computer Science]] :computerscience: -*** [[https://arxiv.org/rss/eess][Electrical Engineering and System Science]] :eess: -** Linux :linux: -*** [[https://www.reddit.com/r/linux.rss][Reddit Linux]] -*** [[https://www.gamingonlinux.com/article_rss.php][Gaming on linux]] :gaming: -*** [[https://hackaday.com/blog/feed/][Hackaday]] :hackaday: -*** [[http://lxer.com/module/newswire/headlines.rss][Lxer]] -** Programming :programming: -*** [[https://this-week-in-rust.org/rss.xml][This Week in Rust]] :rust: -*** [[https://opensource.com/feed][Opensource]] :opensource: -** Emacs :emacs: -*** [[https://www.reddit.com/r/emacs.rss][Reddit Emacs]] :reddit: diff --git a/.config/emacs/init.el b/.config/emacs/init.el new file mode 100644 index 0000000..b1af5f2 --- /dev/null +++ b/.config/emacs/init.el @@ -0,0 +1,57 @@ +;;; init.el -*- lexical-binding: t no-byte-compile: t -*- +;; copied from centaur emacs +(setq gc-cons-threshold most-positive-fixnum) + +(setq-default mode-line-format nil) ;; only for startup + +(setq auto-mode-case-fold nil) + +(unless (or (daemonp) noninteractive init-file-debug) + ;; Prevent flashing of messages at startup + (when (display-graphic-p) + (setq-default inhibit-redisplay t + inhibit-message t) + (defun reset-inhibit-vars () + (setq-default inhibit-redisplay nil + inhibit-message nil) + (redraw-frame)) + (add-hook 'window-setup-hook #'reset-inhibit-vars) + (define-advice startup--load-user-init-file (:after (&rest _) reset-inhibit-vars) + (and init-file-had-error (reset-inhibit-vars)))) + + ;; Suppress file handlers operations at startup + ;; `file-name-handler-alist' is consulted on each call to `require' and `load' + (let ((old-value file-name-handler-alist)) + (setq file-name-handler-alist nil) + (set-default-toplevel-value 'file-name-handler-alist file-name-handler-alist) + (add-hook 'emacs-startup-hook + (lambda () + "Recover file name handlers." + (setq file-name-handler-alist + (delete-dups (append file-name-handler-alist old-value)))) + 101))) + +;; Load path +;; Optimize: Force "lisp"" and "site-lisp" at the head to reduce the startup time. +(defun update-load-path (&rest _) + "Update `load-path'." + (dolist (dir '("site-lisp" "lisp")) + (push (expand-file-name dir user-emacs-directory) load-path))) + +(defun add-subdirs-to-load-path (&rest _) + "Add subdirectories to `load-path'. + +Don't put large files in `site-lisp' directory, e.g. EAF. +Otherwise the startup will be very slow. " + (let ((default-directory (expand-file-name "site-lisp" user-emacs-directory))) + (normal-top-level-add-subdirs-to-load-path))) + +(advice-add #'package-initialize :after #'update-load-path) +(advice-add #'package-initialize :after #'add-subdirs-to-load-path) + +(update-load-path) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; init.el ends here +(require 'init-package) diff --git a/.config/emacs/lisp/init-const.el b/.config/emacs/lisp/init-const.el new file mode 100644 index 0000000..3849e91 --- /dev/null +++ b/.config/emacs/lisp/init-const.el @@ -0,0 +1,7 @@ +;;; init-const.el -*- lexical-binding: t -*- +(defconst ON-LINUX (eq system-type 'gnu/linux) + "Under Linux system") +(defconst ON-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)) + "Under Windows System") + +(provide 'init-const) diff --git a/.config/emacs/lisp/init-package.el b/.config/emacs/lisp/init-package.el new file mode 100644 index 0000000..d14409e --- /dev/null +++ b/.config/emacs/lisp/init-package.el @@ -0,0 +1,9 @@ +;;; init-package.el -*- lexical-binding: t -*- +(require 'init-const) + + + + + + +(provide 'init-package) diff --git a/.config/emacs/logos/xemacs_color.png b/.config/emacs/logos/xemacs_color.png deleted file mode 100644 index 1df9ea9..0000000 Binary files a/.config/emacs/logos/xemacs_color.png and /dev/null differ diff --git a/.config/emacs/logos/xemacs_color.svg b/.config/emacs/logos/xemacs_color.svg deleted file mode 100644 index 189f9ad..0000000 --- a/.config/emacs/logos/xemacs_color.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - -