]> git.earman.xyz Git - emacsinit.git/commitdiff
Change order of loading libraries
authorrearman <rearman@r717.net>
Wed, 19 Jun 2024 20:58:30 +0000 (16:58 -0400)
committerrearman <rearman@r717.net>
Wed, 19 Jun 2024 20:58:30 +0000 (16:58 -0400)
Get org-mode to load with all my changes on first start.

init.el
re/re-org-defuns.el [new file with mode: 0644]
re/re-org.el

diff --git a/init.el b/init.el
index 40ca9d6627756ed7c833898553ef1815eb6f5cf9..4063e17edac3461166968a65d788924318eec1f2 100644 (file)
--- a/init.el
+++ b/init.el
@@ -9,12 +9,12 @@
       inhibit-startup-buffer-menu t
       server-client-instructions nil
       frame-resize-pixelwise t
-      initial-scratch-message (message ";;; Emacs loaded in %s.\n\n" (emacs-init-time)))
+      initial-scratch-message (message ";;; Emacs loaded in %s.\n\n"
+                                      (emacs-init-time)))
 
 ;; Load External Libraries
 (add-to-list 'load-path (concat user-emacs-directory "re/"))
 (add-to-list 'load-path (concat user-emacs-directory "acme-mouse/"))
-(require 're-c-style)
 (require 're-editing-defuns)
 (require 're-packages)
 (require 're-os-specific)
                             (require 're-electronics-defuns)
                             (require 're-plc-defuns)
                             (require 're-refrigeration-defuns)
-                            (require 're-skeletons)))
-
-;; Don't do anything with org until I call it
-(add-hook 'org-mode-hook (lambda ()
-                          #'abbrev-mode
-                          (require 're-org)))
+                            (require 're-skeletons)
+                            (require 're-org)
+                            (require 're-org-defuns)))
+(add-hook 'c-mode-hook (lambda ()
+                        (require 're-c-style)))
 
 
 ;; Buffer customizations
diff --git a/re/re-org-defuns.el b/re/re-org-defuns.el
new file mode 100644 (file)
index 0000000..53b1084
--- /dev/null
@@ -0,0 +1,30 @@
+;;; re-org-defuns.el --- Quae configurare  -*- lexical-binding: t; -*-
+;; Haec pars Emacs non est.
+;; Code:
+
+(defun re/org-agenda-show-custom (&optional arg)
+  "Show my custom agenda."
+  (interactive "P")
+  (org-agenda arg " "))
+
+(defun re/org-show-agenda (&optional arg)
+  "Show the main agenda"
+  (interactive "P")
+  (org-agenda arg "a"))
+
+(defun re/org-auto-generate-ids-in-file ()
+  "Add ID properties to all headlines in the current
+ file which do not already have one."
+  (interactive)
+  (org-map-entries 'org-id-get-create))
+
+(defun re/tangle-init ()
+  "Tangle and compile init.org.
+Stolen from https://github.com/larstvei/dot-emacs."
+  (when (equal (buffer-file-name)
+              (expand-file-name (concat user-emacs-directory "config.org")))
+    (let ((prog-mode-hook nil))
+      (org-babel-tangle))))
+
+(provide 're-org-defuns)
+;;; hic terminatur re-org-defuns.el
index 3a243a0b3160714b4a82adcd0dd3b79cc77dca71..37de94144e2de277743a8f1da224fc0f492e8c3d 100644 (file)
@@ -2,6 +2,9 @@
 ;; Haec pars Emacs non est.
 ;; Code:
 
+(add-hook 'org-mode-hook (lambda ()
+                          #'abbrev-mode))
+
 (setq org-startup-folded t
       org-startup-indented t)
 
       org-src-preserve-indentation t
       org-src-fontify-natively t)
 
-(defun re/org-agenda-show-custom (&optional arg)
-  "Show my custom agenda."
-  (interactive "P")
-  (org-agenda arg " "))
-
-(defun re/org-show-agenda (&optional arg)
-  "Show the main agenda"
-  (interactive "P")
-  (org-agenda arg "a"))
-
-(defun re/org-auto-generate-ids-in-file ()
-  "Add ID properties to all headlines in the current
- file which do not already have one."
-  (interactive)
-  (org-map-entries 'org-id-get-create))
-
-(defun re/tangle-init ()
-  "Tangle and compile init.org.
-Stolen from https://github.com/larstvei/dot-emacs."
-  (when (equal (buffer-file-name)
-              (expand-file-name (concat user-emacs-directory "config.org")))
-    (let ((prog-mode-hook nil))
-      (org-babel-tangle))))
-
 (keymap-set org-mode-map "M-<right>" 'org-shiftmetaright)
 (keymap-set org-mode-map "M-<left>" 'org-shiftmetaleft)
 (keymap-set org-mode-map "M-S-<right>" 'org-metaright)