summary refs log tree commit diff stats
path: root/config.org
diff options
context:
space:
mode:
authorCase Duckworth2021-01-27 12:43:50 -0600
committerCase Duckworth2021-01-27 12:43:50 -0600
commitc0cbcc3203469037deac6f5d3f2ecffacf3e3c06 (patch)
tree7efe2c647268830fa33d1f216cb3bcd917d239ad /config.org
parentHide the default modeline and show window dividers (diff)
downloademacs-c0cbcc3203469037deac6f5d3f2ecffacf3e3c06.tar.gz
emacs-c0cbcc3203469037deac6f5d3f2ecffacf3e3c06.zip
Add acdw/find-config and acdw/reload
Diffstat (limited to 'config.org')
-rw-r--r--config.org53
1 files changed, 53 insertions, 0 deletions
diff --git a/config.org b/config.org index d0ca5f4..d621972 100644 --- a/config.org +++ b/config.org
@@ -426,6 +426,10 @@ I need to do to see where =Package cl is deprecated= is coming from.
426So... function! 426So... function!
427 427
428#+begin_src emacs-lisp :noweb-ref functions 428#+begin_src emacs-lisp :noweb-ref functions
429 ;; Make the compiler happy
430 (autoload 'file-dependents "loadhist")
431 (autoload 'feature-file "loadhist")
432
429 (defun acdw/fucking-cl () 433 (defun acdw/fucking-cl ()
430 "Find out where the fuck `cl' is being required from." 434 "Find out where the fuck `cl' is being required from."
431 (interactive) 435 (interactive)
@@ -1659,6 +1663,7 @@ machine git.example.com user acdw password hahayeahrightyamoroniwouldn'tgiveyout
1659#+end_example 1663#+end_example
1660 1664
1661#+begin_src emacs-lisp :noweb-ref hooks 1665#+begin_src emacs-lisp :noweb-ref hooks
1666 (autoload 'magit-process-password-auth-source "magit")
1662 (add-hook 'magit-process-find-password-functions 1667 (add-hook 'magit-process-find-password-functions
1663 #'magit-process-password-auth-source) 1668 #'magit-process-password-auth-source)
1664#+end_src 1669#+end_src
@@ -2442,6 +2447,54 @@ my config here /logically/, while keeping the generated file organized
2442 ;;; config.el ends here 2447 ;;; config.el ends here
2443#+end_src 2448#+end_src
2444 2449
2450*** Ease of editing
2451:PROPERTIES:
2452:header-args: :tangle no
2453:END:
2454
2455#+begin_src emacs-lisp :noweb-ref functions
2456 (defun acdw/find-config ()
2457 "Find `config.org'."
2458 (interactive)
2459 (find-file (expand-file-name "config.org"
2460 user-emacs-directory)))
2461#+end_src
2462
2463Bind it to =C-z i= because =C-z C-c= is taken for capture.
2464
2465#+begin_src emacs-lisp :noweb-ref bindings
2466 (define-key acdw/leader (kbd "i") #'acdw/find-config)
2467#+end_src
2468
2469*** Ease of reloading
2470:PROPERTIES:
2471:header-args: :tangle no
2472:END:
2473
2474#+begin_src emacs-lisp :noweb-ref functions
2475 (defun acdw/reload ()
2476 "Tangle and reload Emacs configuration."
2477 (interactive)
2478 (let ((config (expand-file-name "config.org"
2479 user-emacs-directory)))
2480 ;; tangle
2481 (with-current-buffer (find-file-noselect config)
2482 (let ((prog-mode-hook nil))
2483 (add-to-list 'load-path (expand-file-name "straight/build/org/"
2484 user-emacs-directory))
2485 (require 'org)
2486 (org-babel-tangle)))
2487 ;; load init files
2488 (load (expand-file-name "early-init.el" user-emacs-directory))
2489 (byte-compile-file (expand-file-name "init.el" user-emacs-directory) :load)
2490 (byte-compile-file (expand-file-name "config.el" user-emacs-directory)
2491 :load)))
2492#+end_src
2493
2494#+begin_src emacs-lisp :noweb-ref bindings
2495 (define-key acdw/leader (kbd "C-M-r") #'acdw/reload)
2496#+end_src
2497
2445** init.el 2498** init.el
2446:PROPERTIES: 2499:PROPERTIES:
2447:header-args: :tangle init.el :noweb yes 2500:header-args: :tangle init.el :noweb yes