diff options
| author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-11-22 06:17:37 +0000 | 
|---|---|---|
| committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-11-22 06:20:05 +0000 | 
| commit | 9587f927573725e5377e4263ea95d0fa84234bca (patch) | |
| tree | 2e2962015d1bf4189dcac6bb348f933c91a0a212 /Emacs/.config/emacs | |
| parent | f1fba0ae2feaee80cc2e10c5241777f2e2ce13a8 (diff) | |
| download | dotfiles-9587f927573725e5377e4263ea95d0fa84234bca.tar.gz dotfiles-9587f927573725e5377e4263ea95d0fa84234bca.tar.bz2 dotfiles-9587f927573725e5377e4263ea95d0fa84234bca.zip | |
(Emacs)+bindings for literate compile function
Described in the edit section, just read.
Diffstat (limited to 'Emacs/.config/emacs')
| -rw-r--r-- | Emacs/.config/emacs/config.org | 21 | ||||
| -rw-r--r-- | Emacs/.config/emacs/init.el | 2 | 
2 files changed, 23 insertions, 0 deletions
| diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 5b977ea..2ec9547 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -308,6 +308,27 @@ moment), bind to general some basic binds.    (leader      "h"   #'help-command))  #+end_src +*** Binds for literate +If you check [[file:init.el][init.el]] you'll see I define a class of functions with the +=+literate/= namespace.  In particular the =+literate/load-config= and +=+literate/compile-config= functions provide useful functionality for +the config. + +I usually use these functions when testing out new Emacs features: +I'll write a bit of code in this org file, compile using +=+literate/compile-config= then test it out in a new Emacs session. +If I like the feature, I keep it in my org file.  If I don't, no harm +done as once I end the current Emacs session it'll recompile and +remove the section. + +#+begin_src emacs-lisp +(use-package general +  :general +  (leader +    :infix "q" +    "c" #'+literate/compile-config +    "l" #'+literate/load-config)) +#+end_src  ** Evil  Evil (Emacs VI Layer) is a package that brings the Vi experience to  Emacs.  Packaged with it by default are: diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index bed923e..3e6c101 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -53,6 +53,7 @@  (defun +literate/load-config ()    "Load all files in +literate/output-files." +  (interactive)    (mapc #'(lambda (x) (load-file x)) +literate/output-files))  (defun +literate/org-files-exist () @@ -66,6 +67,7 @@  (autoload #'org-babel-tangle-file "ob-tangle")  (defun +literate/compile-config ()    "Compile all files in +literate/org-files via org-babel-tangle." +  (interactive)    (message "Compiling files...")    (mapc #'org-babel-tangle-file +literate/org-files)    (message "Files compiled") | 
