Browse Source

isg-init.org -> config.org

master
Inderjit Gill 6 months ago
parent
commit
931986a447
3 changed files with 37 additions and 37 deletions
  1. +2
    -2
      .gitignore
  2. +5
    -5
      config.org
  3. +30
    -30
      init.el

+ 2
- 2
.gitignore View File

@@ -1,5 +1,5 @@
isg-custom.el
isg-init.el
config.el
custom.el
org-gcal
gcal.org
eshell

isg-init.org → config.org View File

@@ -2,16 +2,16 @@
#+AUTHOR: Inderjit Gill

NOTE: after changing this file:
1. Either call isg--generate-isg-init-file or delete ~/.emacs.d/isg-init.el
1. Either call isg--compile-config or delete ~/.emacs.d/config.el
2. restart emacs

#+BEGIN_SRC emacs-lisp
(defun isg--compile-isg-init ()
(defun isg--compile-config ()
(interactive)
(org-babel-tangle-file (expand-file-name "~/.emacs.d/isg-init.org")
(expand-file-name "~/.emacs.d/isg-init.el")
(org-babel-tangle-file (expand-file-name "~/.emacs.d/config.org")
(expand-file-name "~/.emacs.d/config.el")
"emacs-lisp"))
;; (isg--compile-isg-init)
;; (isg--compile-config)
#+END_SRC

|--------------+-------------+--------------------------------------------------|

+ 30
- 30
init.el View File

@@ -25,7 +25,7 @@

(defvar isg--timing-hash (make-hash-table :test 'equal))

;; here's the most recent package-selected-packages list which should be copied into isg-custom.el:
;; here's the most recent package-selected-packages list which should be copied into custom.el:
;;
;; (package-selected-packages
;; (quote
@@ -54,11 +54,11 @@
(isg--time-section-stop ,key)))

(defun isg--time-show-slower-than (min)
(progn
(message "________________________START TIMES________________________")
(maphash (lambda (k _v) (if (> _v min) (message "%.3f: %s" _v k))) isg--timing-hash)
(message "___________________________________________________________")
nil))
(progn
(message "________________________START TIMES________________________")
(maphash (lambda (k _v) (if (> _v min) (message "%.3f: %s" _v k))) isg--timing-hash)
(message "___________________________________________________________")
nil))

(isg--time-section-start "overall")

@@ -69,22 +69,22 @@
(package-initialize)

(isg--timer "package"
(eval-when-compile
(require 'use-package))
(setq package-enable-at-startup nil)
(setcdr (last package-archives)
'(("melpa-stable" . "https://stable.melpa.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
(setq package-check-signature nil)
(unless (package-installed-p 'use-package)
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
(package-install 'use-package)))
(eval-when-compile
(require 'use-package))
(setq package-enable-at-startup nil)
(setcdr (last package-archives)
'(("melpa-stable" . "https://stable.melpa.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
(setq package-check-signature nil)
(unless (package-installed-p 'use-package)
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
(package-install 'use-package)))

;; after use-package-always-ensure is set, all subsequent use-package
;; statements will download packages if needed
@@ -92,20 +92,20 @@
(setq use-package-verbose t)

(require 'cl)
; third party code that isn't in melpa-stable yet
; third party code that isn't in melpa-stable yet
(push "~/.emacs.d/external" load-path)
(push "~/.emacs.d/external/org-drill" load-path)


(if (file-exists-p (expand-file-name "~/.emacs.d/isg-init.el"))
(isg--timer "load isg-init.el"
(load "~/.emacs.d/isg-init.el"))
(isg--timer "load isg-init.org"
(org-babel-load-file (expand-file-name "~/.emacs.d/isg-init.org"))))
(if (file-exists-p (expand-file-name "~/.emacs.d/config.el"))
(isg--timer "load config.el"
(load "~/.emacs.d/config.el"))
(isg--timer "load config.org"
(org-babel-load-file (expand-file-name "~/.emacs.d/config.org"))))

(isg--timer "custom-file"
(setq custom-file "~/.emacs.d/isg-custom.el")
(load custom-file))
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file))

(isg--time-section-stop "overall")
;; show slowest sections in the *Messages* buffer

Loading…
Cancel
Save