Browse Source

removed hacky isg--fully-refreshed-load

Inderjit Gill 3 months ago
parent
commit
8c8e58148c
2 changed files with 23 additions and 9 deletions
  1. 6
    9
      init.el
  2. 17
    0
      isg-init.org

+ 6
- 9
init.el View File

@@ -23,10 +23,6 @@
23 23
 
24 24
 ;;; Code:
25 25
 
26
-;; set this to t in order to rebuild isg-init.el from isg-init.org
27
-;;
28
-
29
-(defvar isg--fully-refreshed-load nil)
30 26
 (defvar isg--timing-hash (make-hash-table :test 'equal))
31 27
 
32 28
 ;; here's the most recent package-selected-packages list which should be copied into isg-custom.el:
@@ -100,11 +96,12 @@
100 96
 (push "~/.emacs.d/external" load-path)
101 97
 (push "~/.emacs.d/external/org-drill" load-path)
102 98
 
103
-(if isg--fully-refreshed-load
104
-    (isg--timer "load isg-init.org"
105
-               (org-babel-load-file (expand-file-name "~/.emacs.d/isg-init.org")))
106
-  (isg--timer "load isg-init.el"
107
-             (load "~/.emacs.d/isg-init.el")))
99
+
100
+(if (file-exists-p (expand-file-name "~/.emacs.d/isg-init.el"))
101
+    (isg--timer "load isg-init.el"
102
+                (load "~/.emacs.d/isg-init.el"))
103
+  (isg--timer "load isg-init.org"
104
+               (org-babel-load-file (expand-file-name "~/.emacs.d/isg-init.org"))))
108 105
 
109 106
 (isg--timer "custom-file"
110 107
            (setq custom-file "~/.emacs.d/isg-custom.el")

+ 17
- 0
isg-init.org View File

@@ -1,6 +1,19 @@
1 1
 #+TITLE: emacs configuration
2 2
 #+AUTHOR: Inderjit Gill
3 3
 
4
+NOTE: after changing this file:
5
+1. Either call isg--generate-isg-init-file or delete ~/.emacs.d/isg-init.el
6
+2. restart emacs
7
+
8
+#+BEGIN_SRC emacs-lisp
9
+(defun isg--compile-isg-init ()
10
+  (interactive)
11
+  (org-babel-tangle-file (expand-file-name "~/.emacs.d/isg-init.org")
12
+                         (expand-file-name "~/.emacs.d/isg-init.el")
13
+                         "emacs-lisp"))
14
+;; (isg--compile-isg-init)
15
+#+END_SRC
16
+
4 17
   |--------------+-------------+--------------------------------------------------|
5 18
   | Section      | Key         | Command                                          |
6 19
   |--------------+-------------+--------------------------------------------------|
@@ -1884,6 +1897,10 @@
1884 1897
              (global-set-key "\M-p" 'backward-paragraph)
1885 1898
              (global-set-key (kbd "C-<return>") 'electric-newline-and-maybe-indent)
1886 1899
 
1900
+             (global-set-key (kbd "C-\\") 'point-to-register)
1901
+             (global-set-key (kbd "M-\\") 'jump-to-register)
1902
+
1903
+
1887 1904
              (defun isg--machine-set-keys ()
1888 1905
                "set machine specific key bindings"
1889 1906
                (mapcar (lambda (kons)