Create ha-hamacs-load
function to re-read files
This function shows my Hamacs files, and allows me to update a reload it. Also, fixed a few bugs.
This commit is contained in:
parent
c243a417e9
commit
4e5a4e9800
4 changed files with 37 additions and 24 deletions
|
@ -107,7 +107,7 @@ the native-comp model, but I reserve the right to change this."
|
||||||
* Load the Rest
|
* Load the Rest
|
||||||
The following loads the rest of my org-mode literate files. I add them as they are /ready/, but eventually, I'll trim this up into a nicer pattern.
|
The following loads the rest of my org-mode literate files. I add them as they are /ready/, but eventually, I'll trim this up into a nicer pattern.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(dolist (file `("ha-config.org"
|
(defvar ha-hamacs-files `("ha-config.org"
|
||||||
"ha-display.org"
|
"ha-display.org"
|
||||||
"ha-org.org"
|
"ha-org.org"
|
||||||
"ha-org-word-processor.org"
|
"ha-org-word-processor.org"
|
||||||
|
@ -122,14 +122,25 @@ The following loads the rest of my org-mode literate files. I add them as they a
|
||||||
;; "ha-irc.org"
|
;; "ha-irc.org"
|
||||||
;; "ha-passwords.org"
|
;; "ha-passwords.org"
|
||||||
;; "ha-remoting.org"
|
;; "ha-remoting.org"
|
||||||
;; "my-feeds.org"
|
"ha-feed-reader.org"
|
||||||
|
|
||||||
,(when (ha-emacs-for-work?)
|
,(when (ha-emacs-for-work?)
|
||||||
"ha-work.org")))
|
"ha-work.org"))
|
||||||
|
"List of org files that complete the hamacs project.")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
We can test/debug/reload any individual file, via:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun ha-hamacs-load (file)
|
||||||
|
"Load or reload an org-mode FILE containing literate Emacs configuration code."
|
||||||
|
(interactive (list (completing-read "Org file: " ha-hamacs-files)))
|
||||||
(org-babel-load-file (f-join hamacs-source-dir file)))
|
(org-babel-load-file (f-join hamacs-source-dir file)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
We can test/debug any individual file, via:
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
And we can now load everything:
|
||||||
(org-babel-load-file (f-join hamacs-source-dir "ha-org-word-processor.org"))
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(dolist (file ha-hamacs-files)
|
||||||
|
(ha-hamacs-load file))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Technical Artifacts :noexport:
|
* Technical Artifacts :noexport:
|
||||||
Let's provide a name so that the file can be required:
|
Let's provide a name so that the file can be required:
|
||||||
|
|
|
@ -571,7 +571,7 @@ Ways to search for information goes under the ~s~ key. This primarily depends on
|
||||||
(defun ha-rg-go-results-buffer ()
|
(defun ha-rg-go-results-buffer ()
|
||||||
"Pop to the `*rg*' buffer that `rg' creates."
|
"Pop to the `*rg*' buffer that `rg' creates."
|
||||||
(interactive)
|
(interactive)
|
||||||
(pop-to-buffer "*rg*")))
|
(pop-to-buffer "*rg*"))
|
||||||
|
|
||||||
(defun ha-rg-go-next-results ()
|
(defun ha-rg-go-next-results ()
|
||||||
"Bring the next file results into view."
|
"Bring the next file results into view."
|
||||||
|
@ -604,7 +604,7 @@ While the ~C-h~ is easy enough, I am now in the habit of typing ~SPC h~ instead.
|
||||||
"h v" '("variable" . describe-variable)
|
"h v" '("variable" . describe-variable)
|
||||||
"h k" '("key binding" . describe-key)
|
"h k" '("key binding" . describe-key)
|
||||||
"h B" '("embark" . embark-bindings)
|
"h B" '("embark" . embark-bindings)
|
||||||
"h i" '("info" . Info))
|
"h i" '("info" . info))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Consult Enhancements
|
*** Consult Enhancements
|
||||||
|
|
|
@ -31,8 +31,9 @@ cat > $HAMACS_DEST/init.el <<EOF
|
||||||
;; condition where I need to set this so that Emacs can pull our my
|
;; condition where I need to set this so that Emacs can pull our my
|
||||||
;; compiled files.
|
;; compiled files.
|
||||||
|
|
||||||
(add-to-list 'exec-path "/usr/local/bin/")
|
(add-to-list 'exec-path "/usr/local/bin")
|
||||||
|
|
||||||
|
(setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH")))
|
||||||
(defvar hamacs-source-dir "$HAMACS_DIR" "Where we be.")
|
(defvar hamacs-source-dir "$HAMACS_DIR" "Where we be.")
|
||||||
|
|
||||||
;; Let's rock:
|
;; Let's rock:
|
||||||
|
|
|
@ -71,5 +71,6 @@ non-tangled files."
|
||||||
(unless (f-symlink? dir)
|
(unless (f-symlink? dir)
|
||||||
(f-symlink src dir)))))
|
(f-symlink src dir)))))
|
||||||
|
|
||||||
|
(ha/install-configuration)
|
||||||
(provide 'final-initialize)
|
(provide 'final-initialize)
|
||||||
;;; final-initialize.el ends here
|
;;; final-initialize.el ends here
|
||||||
|
|
Loading…
Reference in a new issue