Move loading of the emacs package from configuration.org to init.el

This commit is contained in:
Gergely Polonkai 2025-05-29 22:08:15 +02:00
parent 3bd5c2c865
commit 69549ce861
No known key found for this signature in database
GPG Key ID: 38F402C8471DDE93
2 changed files with 40 additions and 32 deletions

View File

@ -3,38 +3,6 @@
Now that we have package management configured we can set up defaults more easily. This includes every builtin packages, font faces, and the like.
#+begin_src emacs-lisp
(use-package emacs
:ensure nil
:init
;; Required for Consult/Vertico
(defun crm-indicator (args)
(cons (format "[CRM%s] %s"
(replace-regexp-in-string
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
crm-separator)
(car args))
(cdr args)))
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
(setq frame-title-format '((:eval (concat system-name
": "
(if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b")))))
:custom
(user-full-name "Gergely Polonkai")
(user-mail-address "gergely@polonkai.eu")
(kill-read-only-ok t)
(use-dialog-box nil)
(cursor-type 'bar)
(echo-keystrokes .01)
(fill-column 120)
(initial-scratch-message "")
(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))
(enable-recursive-minibuffers t)
(completion-cycle-threshold 3)
(tab-always-indent 'complete)
:hook
(minibuffer-setup . cursor-intangible-mode))
#+end_src
** Set Orgs main directory

40
init.el
View File

@ -65,6 +65,46 @@
(load "gpolonkai/file-utils")
(load "gpolonkai/magit-utils")
(defun crm-indicator (args)
"Generate a prompt for `completing-read-multiple'.
ARGS is a cons cell of two strings, which will be used in the prompt in reverse
order."
(cons (format "[CRM%s] %s"
(replace-regexp-in-string
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'"
""
crm-separator)
(car args))
(cdr args)))
(use-package emacs
:ensure nil
:init
;; Required for Consult/Vertico
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
(setq frame-title-format
'((:eval (concat system-name
": "
(if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b")))))
:custom
(user-full-name "Gergely Polonkai")
(user-mail-address "gergely@polonkai.eu")
(kill-read-only-ok t)
(use-dialog-box nil)
(cursor-type 'bar)
(echo-keystrokes .01)
(fill-column 120)
(initial-scratch-message "")
(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))
(enable-recursive-minibuffers t)
(completion-cycle-threshold 3)
(tab-always-indent 'complete)
:hook
(minibuffer-setup . cursor-intangible-mode))
;; I started moving my configuration to this Org file. Its easier to document this way.
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))