From ca12b7cc36d035a91118718ff4da6539d01efd0c Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 6 Nov 2023 12:18:59 +0000 Subject: [PATCH] Add everything from old defaults to new defaults section --- home/emacs/config.org | 81 ++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/home/emacs/config.org b/home/emacs/config.org index 9cce17b6..af9cbadb 100644 --- a/home/emacs/config.org +++ b/home/emacs/config.org @@ -7,11 +7,47 @@ #+BEGIN_SRC emacs-lisp :results output silent (setq user-full-name "Evie Litherland-Smith" - user-mail-address "evie@xenia.me.uk") - (setq custom-file (locate-user-emacs-file "custom.el")) + user-mail-address "evie@xenia.me.uk" + custom-file (locate-user-emacs-file "custom.el") + load-prefer-newer t + indent-tabs-mode nil + global-auto-revert-non-file-buffers t + dired-auto-revert-buffer t + dired-dwim-target t + tab-always-indent 'complete + completion-cycle-threshold 3 + completions-detailed t + xref-show-definitions-function #'xref-show-definitions-completing-read + kill-do-not-save-duplicates t + auto-window-vscroll nil + fast-but-imprecise-scrolling t + scroll-conservatively 101 + scroll-margin 0 + scroll-preserve-screen-position 1) + (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) + + (global-auto-revert-mode +1) + (delete-selection-mode) + + ;; Misc useful keymaps + (keymap-global-set "M-#" #'dictionary-lookup-definition) + (keymap-global-set "C-c r" #'recentf) + (keymap-global-set "C-c b" #'ibuffer) + (keymap-global-set "C-c p l" #'list-packages) + (keymap-global-set "C-c p r" #'package-refresh-contents) + (keymap-global-set "C-c p i" #'package-install) + (keymap-global-set "C-c p d" #'package-delete) + + ;; turn on spell checking, if available. + (when (and (require 'ispell nil :noerror) (executable-find ispell-program-name)) + (add-hook 'text-mode-hook #'flyspell-mode) + (add-hook 'prog-mode-hook #'flyspell-prog-mode)) + + ;; Make shebang (#!) file executable when saved + (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) #+END_SRC ** package-archive with priorities @@ -120,47 +156,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]] For now I'll just copy all config into this file, to confirm that it works properly. Will reorganise into separate sections later -** TODO Defaults -#+BEGIN_SRC emacs-lisp - ;;; Code: - (setq load-prefer-newer t - indent-tabs-mode nil - global-auto-revert-non-file-buffers t - dired-auto-revert-buffer t - dired-dwim-target t - tab-always-indent 'complete - completion-cycle-threshold 3 - completions-detailed t - xref-show-definitions-function #'xref-show-definitions-completing-read - kill-do-not-save-duplicates t - auto-window-vscroll nil - fast-but-imprecise-scrolling t - scroll-conservatively 101 - scroll-margin 0 - scroll-preserve-screen-position 1) - - (global-auto-revert-mode +1) - (delete-selection-mode) - - ;; Misc useful keymaps - (keymap-global-set "M-#" #'dictionary-lookup-definition) - (keymap-global-set "C-c r" #'recentf) - (keymap-global-set "C-c b" #'ibuffer) - (keymap-global-set "C-c p l" #'list-packages) - (keymap-global-set "C-c p r" #'package-refresh-contents) - (keymap-global-set "C-c p i" #'package-install) - (keymap-global-set "C-c p d" #'package-delete) - - ;; turn on spell checking, if available. - (when (and (require 'ispell nil :noerror) (executable-find ispell-program-name)) - (add-hook 'text-mode-hook #'flyspell-mode) - (add-hook 'prog-mode-hook #'flyspell-prog-mode)) - - ;; Make shebang (#!) file executable when saved - (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) - -#+END_SRC - ** TODO UI #+BEGIN_SRC emacs-lisp (setq use-dialog-box nil