Compare commits
5 commits
c47c5a5185
...
ff740ce08e
| Author | SHA1 | Date | |
|---|---|---|---|
| ff740ce08e | |||
| 1a21781fba | |||
| d3dc9465dd | |||
| f5ef8d68c5 | |||
| 0b57fa79b5 |
2 changed files with 32 additions and 24 deletions
54
config.org
54
config.org
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
** Core
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar elpaca-installer-version 0.7)
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar elpaca-installer-version 0.11)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil :depth 1
|
||||
:ref nil :depth 1 :inherit ignore
|
||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
|
|
@ -23,30 +23,30 @@
|
|||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(when (<= emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let* ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
#+end_src
|
||||
#+END_SRC
|
||||
|
||||
** Use-package integration
|
||||
|
||||
|
|
@ -471,7 +471,7 @@ C-c C-c to apply."
|
|||
|
||||
*** Corfu
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+BEGIN_SRC
|
||||
(use-package corfu
|
||||
;; Optional customizations
|
||||
:bind (:map corfu-map ("<tab>" . corfu-complete))
|
||||
|
|
@ -502,7 +502,7 @@ C-c C-c to apply."
|
|||
|
||||
*** Company-mode
|
||||
|
||||
#+BEGIN_SRC
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package company
|
||||
:config
|
||||
(define-key prog-mode-map
|
||||
|
|
@ -964,6 +964,7 @@ Preserve indentation in SRC blocks
|
|||
(org-roam-db-autosync-mode)
|
||||
;; Add todo lists to org-agenda
|
||||
(custom-set-variables '(org-agenda-files (directory-files-recursively org-roam-directory "todo\\.org$")))
|
||||
(load (expand-file-name "init.el" org-roam-directory) :no-error-if-file-is-missing)
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
|
|
@ -1024,6 +1025,15 @@ Preserve indentation in SRC blocks
|
|||
)
|
||||
#+END_SRC
|
||||
|
||||
** Org Download
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package org-download
|
||||
:config
|
||||
(add-hook 'dired-mode-hook 'org-download-enable)
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
* Elisp
|
||||
|
||||
** Add demos to describe-function
|
||||
|
|
@ -1179,12 +1189,12 @@ This should normally be done by the init.el to load this configuration.
|
|||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun myrmi/visit-config ()
|
||||
"Reloads ~/.emacs.d/config.org at runtime"
|
||||
"Visit emacs config"
|
||||
(interactive)
|
||||
(find-file my-config-file))
|
||||
|
||||
(defun myrmi/reload-config ()
|
||||
"Reloads ~/.emacs.d/config.org at runtime"
|
||||
"Reload emacs config at runtime"
|
||||
(interactive)
|
||||
(org-babel-load-file my-config-file))
|
||||
#+END_SRC
|
||||
|
|
|
|||
2
init.el
2
init.el
|
|
@ -7,11 +7,9 @@
|
|||
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
||||
;; This is the actual config file. It is omitted if it doesn't exist so emacs won't refuse to launch.
|
||||
(defvar my-config-file (expand-file-name "config.org" user-emacs-directory))
|
||||
(defvar notes-config-file (expand-file-name "init.el" "~/projects/notes/"))
|
||||
|
||||
(when (file-readable-p my-config-file)
|
||||
(org-babel-load-file (expand-file-name my-config-file)))
|
||||
|
||||
(load notes-config-file :no-error-if-file-is-missing)
|
||||
(load custom-file :no-error-if-file-is-missing)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue