-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-minimal.el
104 lines (82 loc) · 3.75 KB
/
init-minimal.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
;; -*- lexical-binding: t -*-
;; emacs -q --load ~/.config/emacs/init-minimal.el
(setq initial-scratch-message nil
inhibit-startup-screen t)
(use-package gif-screencast
:load-path "elpaca/repos/emacs-gif-screencast/"
:commands gif-screencast-start-or-stop
:custom
(gif-screencast-program "grim")
(gif-screencast-args ()))
(global-set-key (kbd "C-f") 'find-file)
(global-set-key (kbd "M-d") 'switch-to-buffer)
(global-set-key (kbd "M-r") 'revert-buffer)
(switch-to-buffer "*Messages*")
;; (find-file "~/.config/emacs/init-minimal.el")
;; ^base
;; https://github.com/progfolio/elpaca/issues/222#issuecomment-1872596777
;; https://github.com/NixOS/nixpkgs/issues/267548
(setq elpaca-core-date '(20231211))
;; installer
(defvar elpaca-installer-version 0.7)
(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
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(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))
(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)))
(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")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
;; installer end
;; (setq elpaca-verbosity most-positive-fixnum)
;; load directly before elpaca-use-package to register :blackout use-package handler
(elpaca blackout)
(elpaca elpaca-use-package
;; Enable use-package :ensure support for Elpaca.
(elpaca-use-package-mode)
(setq use-package-always-ensure t))
(elpaca-wait)
;; ^base2
(elpaca-test
(elpaca elpaca-use-package
;; Enable use-package :ensure support for Elpaca.
(elpaca-use-package-mode)
(setq use-package-always-ensure t))
(use-package insert-shebang
:commands insert-shebang
:config
(remove-hook 'find-file-hook 'insert-shebang)
:preface
(setq my-insert-shebang-enabled nil)
:custom
(insert-shebang-track-ignored-filename nil))
)