From: rearman Date: Fri, 14 Jun 2024 18:03:46 +0000 (-0400) Subject: Removed early-init tangling from config.org, README is symlink now X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=7e5b0d2ff9dae14ed7ea40cac894010ff6b3181d;p=emacsinit.git Removed early-init tangling from config.org, README is symlink now --- diff --git a/README.org b/README.org deleted file mode 100644 index 60bfc2c..0000000 --- a/README.org +++ /dev/null @@ -1,2 +0,0 @@ -* README -This is my emacs init. See [[file:~/.emacs.d/config.org][config.org]] for more. diff --git a/config.org b/config.org index f30fd98..f175535 100644 --- a/config.org +++ b/config.org @@ -15,43 +15,6 @@ I keep my emacs installs at the latest release, so I don't worry about checking I believe that all scientific knowledge, and by extension computational knowledge, should be shared in Latin. That is to say I intend to facilitate Latin's return as the default language for global knowledge sharing. To be consistent, I will soon be translating as much of this file as possible into Latin. Monitus es. * Meta Configuration I have changed the meta. I no longer overwrite the init.el, instead opting to have the init.el tangle this file. -* Early init -This file was introduced in Emacs 27. I use it mainly for speeding up init. Maybe superfluous, but I do get startup times on the order of /0.015/ seconds on Windows. -** The normal header -There are no GNU Police (yet), but I feel nicer by adding this in. -#+BEGIN_SRC emacs-lisp :tangle ./early-init.el -;;; early-init.el -*- lexical-binding: t; -*- - -;; Haec pars Emacs non est. - -;; Code: -#+END_SRC - -** GC thrashing -Set the GC threshold to max during startup, then set it back to a normal value. Currently testing what "normal" is - slowly raising from default 800k. - -#+BEGIN_SRC emacs-lisp :tangle ./early-init.el -(setq gc-cons-threshold most-positive-fixnum - gc-cons-percentage 0.6) - -(add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold (* 800 1000) - gc-cons-percentage 0.1 - garbage-collection-messages t))) -#+END_SRC - -** Default to home -Have seen the daemon sometimes set a weird default directory. Ensure it gets set to home. -#+BEGIN_SRC emacs-lisp :tangle ./early-init.el -(setq default-directory "~/") -#+END_SRC - -** The normal footer - -#+BEGIN_SRC emacs-lisp :tangle ./early-init.el -(provide 'early-init) -;;; hic terminatur early-init.el -#+END_SRC - * Main init ** Header #+BEGIN_SRC emacs-lisp @@ -63,8 +26,8 @@ Have seen the daemon sometimes set a weird default directory. Ensure it gets se #+END_SRC ** Basic UI preferences -I want no menus, no tool-bars, no blinking cursor, no messages when starting up, and to make resizing work properly. I just want the scratch buffer with a report on =emacs-init-time=. -#+BEGIN_SRC emacs-lisp :tangle ./early-init.el +I want no menus, no tool-bars, no blinking cursor, no messages when starting up, and to make resizing work properly. I just want the scratch buffer with a report on ~emacs-init-time~. +#+BEGIN_SRC emacs-lisp (menu-bar-mode -1) (tool-bar-mode -1) (blink-cursor-mode -1) @@ -119,7 +82,6 @@ Also make a defun/binding to toggle it as needed. *** corfu I used =company-mode= for a long time. I tried corfu and haven't looked back. It is smaller, and does everything I was doing with company. - **** Main Corfu The basics for corfu. Auto popup after one letter, enable globally. #+BEGIN_SRC emacs-lisp @@ -161,22 +123,13 @@ I use magit occasionally. I put this sparse configuration here mostly for a spe #+BEGIN_SRC emacs-lisp (use-package magit :ensure t + :defer t :config (message "Magit Loaded") :bind ((:map ctl-x-map ("g" . magit-status)))) #+END_SRC -*** Recentf -#+BEGIN_SRC emacs-lisp -(use-package recentf - :ensure t - :config - (recentf-mode 1)) - -(keymap-global-set "C-c r" 'recentf-open) -#+END_SRC - *** openwith I need to open binary files with their own editor. Disgusting. #+BEGIN_SRC emacs-lisp @@ -320,31 +273,39 @@ I don't want emacs to beep or blink at me, I want y/n instead of the default yes #+END_SRC *** Buffer interaction -**** General -***** midnight-mode +**** midnight-mode Close unused buffers after 3 days. #+BEGIN_SRC emacs-lisp (midnight-mode t) #+END_SRC -***** delete-selection-mode +**** delete-selection-mode Overwrite selection when active, like every other editor since Sam. #+BEGIN_SRC emacs-lisp (delete-selection-mode t) #+END_SRC -***** Don't disable any functions. +**** Don't disable any functions. #+BEGIN_SRC emacs-lisp (setq disabled-command-function nil) #+END_SRC -***** Inter-program kill-ring +**** Inter-program kill-ring Save pastes from elsewhere into the kill-ring, and don't ask me about killing processes when I kill a buffer. #+BEGIN_SRC emacs-lisp (setq save-interprogram-paste-before-kill t confirm-kill-processes nil) #+END_SRC +**** Maus +:PROPERTIES: +:ID: 451a20e6-73a0-4d55-aeaa-e795980a6974 +:END: +Don't follow links with mouse-1, so I can select without having to use the keyboard (when I want to). +#+BEGIN_SRC emacs-lisp +(setq mouse-1-click-follows-link nil) +#+END_SRC + **** Windmove :PROPERTIES: :ID: 1c8d7229-796f-446a-8ae8-247cd6164a12 @@ -356,13 +317,12 @@ I originally had custom defuns and bindings to do this, but then I found out it windmove-create-window t) #+END_SRC -**** Maus -:PROPERTIES: -:ID: 451a20e6-73a0-4d55-aeaa-e795980a6974 -:END: -Don't follow links with mouse-1, so I can select without having to use the keyboard (when I want to). +**** Recent files +Enable and bind recentf-mode #+BEGIN_SRC emacs-lisp -(setq mouse-1-click-follows-link nil) +(recentf-mode 1) +(setq recentf-max-menu-items 20) +(keymap-global-set "C-c r" 'recentf-open-files) #+END_SRC *** Buffer looks diff --git a/early-init.el b/early-init.el index cf8cf3a..1ef1370 100644 --- a/early-init.el +++ b/early-init.el @@ -7,21 +7,11 @@ (setq gc-cons-threshold most-positive-fixnum gc-cons-percentage 0.6) -(add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold (* 800 1000) - gc-cons-percentage 0.1 - garbage-collection-messages t))) +(add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold (* 1600 1000) + gc-cons-percentage 0.1 + garbage-collection-messages t))) (setq default-directory "~/") (provide 'early-init) ;;; hic terminatur early-init.el - -(menu-bar-mode -1) -(tool-bar-mode -1) -(blink-cursor-mode -1) - -(setq inhibit-startup-screen t - inhibit-startup-buffer-menu t - server-client-instructions nil - frame-resize-pixelwise t - initial-scratch-message (message ";;; Emacs loaded in %s.\n\n" (emacs-init-time)))